query-b002a40ad8cc509ea9b4694e2ef4ab1d

rq turtle/ttl

Counts by CountryQuery:

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 ?country ?countryLabel (COUNT(*) as ?count) where {
  ?item wdt:P31/wdt:P279* wd:Q4671277 ;
        wdt:P17 ?country .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
  } group by ?country ?countryLabel order by desc(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count") v3("?country"):::projected v2("?item") a1((" ")) c6(["bd:serviceParam"]):::iri c3(["wd:Q4671277"]):::iri c8(["en"]):::literal v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v2 --"wdt:P17"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind1[/"count(*)"/] bind1 --as--o v4