query-b33adcd0e6c4bc47d8e6254f49261798
classification systems with parts as Wikidata items SELECT ?kos ?kosLabel (COUNT(DISTINCT ?part) as ?parts) { ?kos wdt:P31/wdt:P279* wd:Q5962346 . ?part wdt:P361 ?kos . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } GROUP BY ?kos ?kosLabel ORDER BY DESC(?parts)
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#>
# classification systems with parts as Wikidata items
SELECT ?kos ?kosLabel (COUNT(DISTINCT ?part) as ?parts) {
?kos wdt:P31/wdt:P279* wd:Q5962346 .
?part wdt:P361 ?kos .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} GROUP BY ?kos ?kosLabel
ORDER BY DESC(?parts)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?kos"):::projected
v3("?part"):::projected
v4("?parts")
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
c3(["wd:Q5962346"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v3 --"wdt:P361"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"count(?part)"/]
v3 --o bind1
bind1 --as--o v4