query-84a7b59daf03049e06282cd83a9ace5b
Ukrainian politicians by birth oblast SELECT ?oblastLabel (COUNT(?thing) as ?total) WHERE { ?thing wdt:P31 wd:Q5 . # human ?thing wdt:P106 wd:Q82955 . # politician ?thing wdt:P27 wd:Q212 . # Ukrainian citizen ?thing wdt:P19 ?place . # who has some place of birth ?place wdt:P131 ?oblast . # where the place belongs to an administrative entity ?oblast wdt:P17 wd:Q212 . # which is in Ukraine
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],uk,ru,pl,be,cs,bg,sr,en". } } GROUP BY ?oblastLabel ORDER BY DESC(?total)
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 bd: <http://www.bigdata.com/rdf#>
# Ukrainian politicians by birth oblast
SELECT ?oblastLabel (COUNT(?thing) as ?total)
WHERE
{
?thing wdt:P31 wd:Q5 . # human
?thing wdt:P106 wd:Q82955 . # politician
?thing wdt:P27 wd:Q212 . # Ukrainian citizen
?thing wdt:P19 ?place . # who has *some* place of birth
?place wdt:P131 ?oblast . # where the place belongs to an administrative entity
?oblast wdt:P17 wd:Q212 . # which is in Ukraine
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],uk,ru,pl,be,cs,bg,sr,en". }
}
GROUP BY ?oblastLabel
ORDER BY DESC(?total)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?oblast")
v3("?place")
v2("?thing"):::projected
v5("?total")
c13(["#91;AUTO_LANGUAGE#93;,uk,ru,pl,be,cs,bg,sr,en"]):::literal
c4(["wd:Q82955"]):::iri
c6(["wd:Q212"]):::iri
c11(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P106"--> c4
v2 --"wdt:P27"--> c6
v2 --"wdt:P19"--> v3
v3 --"wdt:P131"--> v4
v4 --"wdt:P17"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind1[/"count(?thing)"/]
v2 --o bind1
bind1 --as--o v5