query-c98301833d7bd7d29cce622a537725e3

rq turtle/ttl

breakdown of item types (instance of) for a given country (Israel, here) SELECT ?instanceLabel (COUNT(?item) as ?count) WHERE { ?item wdt:P17 wd:Q801 . ?item wdt:P31 ?instance . ?instance rdfs:label ?instanceLabel
FILTER(LANG(?instanceLabel) = "he") } GROUP BY ?instanceLabel ORDER BY DESC(?count) LIMIT 30

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# breakdown of item types (instance of) for a given country (Israel, here)
SELECT ?instanceLabel (COUNT(?item) as ?count) 
WHERE { 
  ?item wdt:P17 wd:Q801 . 
  ?item wdt:P31 ?instance . 
  ?instance rdfs:label ?instanceLabel  
  FILTER(LANG(?instanceLabel) = "he")
}
GROUP BY ?instanceLabel
ORDER BY DESC(?count)
LIMIT 30

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count") v4("?instance") v2("?instanceLabel"):::projected v3("?item"):::projected c3(["wd:Q801"]):::iri f0[["?instanceLabel = 'he'"]] f0 --> v2 v3 --"wdt:P17"--> c3 v3 --"wdt:P31"--> v4 v4 --"rdfs:label"--> v2 bind2[/"count(?item)"/] v3 --o bind2 bind2 --as--o v5