User:Daniel/Queries/Graph profiling: Difference between revisions
From MaRDI portal
< User:Daniel | Queries
Line 18: | Line 18: | ||
=== Number of distinct relationships in the graph === | === Number of distinct relationships in the graph === | ||
=== Examples of distinct relationships in the graph === | |||
{{SPARQL|query= | |||
SELECT DISTINCT ?p WHERE { | |||
?s ?p ?o . | |||
} | |||
LIMIT 100 | |||
}} | |||
=== Types of entities in the graph === | === Types of entities in the graph === |
Revision as of 22:57, 4 November 2024
About
This page assists in the collection and curation of queries that
- can be used with no or minimal modification on multiple graphs
- provide insights into the graph structure
Generic queries
Number of triples in the graph
SELECT (COUNT(*) AS ?count) WHERE {
?s ?p ?o
}
Number of distinct entities in the graph
Number of distinct relationships in the graph
Examples of distinct relationships in the graph
SELECT DISTINCT ?p WHERE {
?s ?p ?o .
}
LIMIT 100
Types of entities in the graph
External entities equivalent to entities in the graph
External entities equivalent to relationships in the graph
Entities with the largest number of triples
Entities with the lowest number of triples
Languages used in the graph
Queries for Wikibase instances
# Properties by frequency in a random sample
SELECT DISTINCT ?property ?propertyLabel (COUNT(*) AS ?count) WHERE {
SERVICE bd:sample { ?item ?p [ ] . bd:serviceParam bd:sample.limit 1000 }
?property a wikibase:Property;
wikibase:claim ?p.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?property ?propertyLabel
ORDER BY DESC(?count)
Queries for a specific set of KGs
- Relative coverage of zbMATH authors in MaRDI vs. Wikidata
See also
- NFDI Core Ontology
- SPARQL Endpoint Metadata Check
- all fine with https://sparql.uniprot.org/
- warnings for https://query.portal.mardi4nfdi.de/proxy/wdqs/bigdata/namespace/wdq/sparql
- warnings for https://database.factgrid.de/sparql
- Vocabulary of Interlinked Datasets (VoID)
- LLM-based SPARQL Query Generation from Natural Language over Federated Knowledge Graphs