query-9ab394c9f75125912953ce8c6d751b20
Give me all subclasses of a class (Example: Building)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?subClass ?subClassLabel ?subClassDesription WHERE {
?subClass wdt:P279+ wd:Q41176 .
SERVICE wikibase:label {bd:serviceParam wikibase:language "en, de"}
} ORDER BY ASC(?subClassLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?subClass"):::projected
v1("?subClassLabel"):::projected
c6(["en, de"]):::literal
c4(["bd:serviceParam"]):::iri
c2(["wd:Q41176"]):::iri
v2 --"wdt:P279"--> c2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end