query-4c4c6fbde2b8d5316caa26edbed0b9ed

rq turtle/ttl

super-classes, doesn't work SELECT DISTINCT ?c ?cLabel WHERE { wd:Q121 wdt:P31?/wdt:P279* ?c. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }

Use at

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#>
#super-classes, doesn't work
SELECT DISTINCT ?c ?cLabel WHERE {
   wd:Q121 wdt:P31?/wdt:P279* ?c.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?c"):::projected a1((" ")) c5(["bd:serviceParam"]):::iri c7(["en"]):::literal c1(["wd:Q121"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P31"--> a1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end a1 --"wdt:P279"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end