query-ddccab4abb8d2da43d8239efc3443f3d

rq turtle/ttl

Propertiesinstance of (P31)place of birth (P19)country (P17)

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  ?pays ?paysLabel
 (COUNT(?item) AS ?nombreA) 

WHERE
{
  ?item wdt:P31 wd:Q146 . # Instances de chat domestique
  ?item wdt:P19 ?birth .  # Collecte pays de naissance
  ?birth wdt:P17 ?pays . 
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Pour afficher le label
}

GROUP BY ?pays ?paysLabel # groupe par label du pays de naissance

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?birth") v1("?item"):::projected v4("?nombreA") v3("?pays"):::projected c2(["wd:Q146"]):::iri c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> c2 v1 --"wdt:P19"--> v2 v2 --"wdt:P17"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind1[/"count(?item)"/] v1 --o bind1 bind1 --as--o v4