Overview of this Wikibase
Back to the overview of all query topics: back
Which and how many persons are registered on this Wikibase?List of all properties
PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
SELECT ?property ?propertyLabel
WHERE {
?property a wikibase:Property .
SERVICE wikibase:label { #Ensures readable labels
bd:serviceParam wikibase:language "en".
}
}
ORDER BY ASC(xsd:integer(STRAFTER(STR(?property), 'P')))
Click here: Test SPARQL query
Which productions are listed on this Wikibase?
PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
SELECT ?staging ?stagingLabel WHERE {
?staging wdt:P3 wd:Q309. #Staging is instance of (P3) staging (Q309)
SERVICE wikibase:label { #Ensures readable labels
bd:serviceParam wikibase:language "en".
}
}
Click here: Test SPARQL query
Map of all performance venues
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX mmd: <https://mtm.uni-trier.de/entity/>
PREFIX mmdt: <https://mtm.uni-trier.de/prop/direct/>
#defaultView:Map
SELECT ?production ?productionLabel ?venueLabel ?WikiDataEntity ?coordinates WHERE {
?production mmdt:P3 mmd:Q309. # Production is an instance of Production (Q309).
?production mmdt:P8 ?venue.
?venue mmdt:P2 ?WikiDataEntity. # P2 = exact match to Wikidata item
SERVICE <https://query.wikidata.org/sparql> {
?WikiDataEntity wdt:P625 ?coordinates. # P625 = coordinates in Wikidata
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
}
}
Click here: Test SPARQL query
Which and how many persons are listed on this Wikibase Instance?
PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
SELECT ?person ?personLabel WHERE {
?person wdt:P3 wd:Q241. # Person is an instance of human being (Q241)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
}
}
The number of results corresponds to the number of real persons created in Wikibase.
Click here: Test SPARQL query
However, if this number is to be output as a result, the following query can be used:
PREFIX wdt: <https://mtm.uni-trier.de/prop/direct/>
PREFIX wd: <https://mtm.uni-trier.de/entity/>
SELECT (COUNT(*) AS ?count) WHERE {
?person wdt:P3 wd:Q241. # Person is an instance of human being (Q241)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
}
}
Click here: Test SPARQL query