query-5abebd629283469de562cf2b0fc699ba
Biographies at orwiki by citizenship SELECT (count(?country) as ?count) ?countryLabel WHERE { ?item wdt:P31 wd:Q5. # item is a human ?item wdt:P27 ?country. # who have some citizenship property ?article schema:about ?item. # and have an article about them ?article schema:isPartOf https://or.wikipedia.org/ . # at Odia Wikipedia SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?countryLabel ORDER BY DESC(?count)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Biographies at orwiki by citizenship
SELECT (count(?country) as ?count) ?countryLabel
WHERE {
?item wdt:P31 wd:Q5. # item is a human
?item wdt:P27 ?country. # who have some citizenship property
?article schema:about ?item. # and have an article about them
?article schema:isPartOf <https://or.wikipedia.org/> . # at *Odia* Wikipedia
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?countryLabel
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?article")
v5("?count")
v3("?country"):::projected
v2("?item")
c8(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6([https://or.wikipedia.org/]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P27"--> v3
v4 --"schema:about"--> v2
v4 --"schema:isPartOf"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"count(?country)"/]
v3 --o bind1
bind1 --as--o v5