query-e49b7787945717f0c2f156a45ae54f66

rq turtle/ttl

TODO

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#>
#defaultView:BarChart
SELECT ?entityLabel (COUNT(?entity) AS ?count) WHERE {
  ?item wdt:P31 wd:Q46970. 
  ?item wdt:P159 ?hq.
  ?hq wdt:P131* ?entity. 
  ?entity wdt:P31 wd:Q35657.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
GROUP BY ?entityLabel
ORDER BY ?count

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count") v4("?entity"):::projected v3("?hq") v2("?item") c7(["bd:serviceParam"]):::iri c2(["wd:Q46970"]):::iri c9(["#91;AUTO_LANGUAGE#93;"]):::literal c5(["wd:Q35657"]):::iri v2 --"wdt:P31"--> c2 v2 --"wdt:P159"--> v3 v3 --"wdt:P131"--> v4 v4 --"wdt:P31"--> c5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind1[/"count(?entity)"/] v4 --o bind1 bind1 --as--o v5