query-1a28d525b25d9ab73e024a791d6ecf5f
Comparison of two modes of "all subclasses"
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel WHERE {
?item p:P31/ps:P31/wdt:P279* wd:Q12280.
FILTER NOT EXISTS { ?item wdt:P31/wdt:P279* wd:Q12280. }
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("?item"):::projected
a2((" "))
a3((" "))
a1((" "))
c7(["bd:serviceParam"]):::iri
c3(["wd:Q12280"]):::iri
c9(["en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:direct/P31"--> e0a1
e0a1 --"p:direct/P279"--> e0c3
e0v1("?item"):::projected
e0a1((" ")):::projected
e0c3(["wd:Q12280"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> c3
v1 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v1 --"p:P31"--> a2
a2 --"p:statement/P31"--> a3
a3 --"p:direct/P279"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end