query-5d9bafef1f10e1d4cfc07170cba8c6a0

rq turtle/ttl

?country_of_citizenshipSELECT

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 (COUNT(DISTINCT ?person) AS ?count) ?country_of_citizenship ?country_of_citizenshipLabel WHERE {

 ?person wdt:P793 wd:Q23702848.
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
 OPTIONAL { ?person wdt:P27 ?country_of_citizenship. }

}
GROUP BY ?country_of_citizenship ?country_of_citizenshipLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?count") v2("?country_of_citizenship"):::projected v1("?person"):::projected c2(["wd:Q23702848"]):::iri c4(["bd:serviceParam"]):::iri c6(["en"]):::literal v1 --"wdt:P793"--> c2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P27".-> v2 end bind1[/"count(?person)"/] v1 --o bind1 bind1 --as--o v3