query-f043205050b9e7946d509827f04f7cc3

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)

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#>
SELECT ?item ?itemLabel (COUNT (?prop) as ?count) WHERE{
  ?item wdt:P31/wdt:P279* wd:Q204832 ;
        ?prop ?statement.
  ?property wikibase:directClaim ?prop.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY $item ?itemLabel
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?count") v2("?item"):::projected v3("?prop"):::projected v5("?property") v4("?statement") a1((" ")) c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q204832"]):::iri v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v2 -->v3--> v4 v5 --"wikibase:directClaim"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind1[/"count(?prop)"/] v3 --o bind1 bind1 --as--o v6