query-e51ad3cda4c9741752cb51ad284e9f6e
Propertiesinstance of (P31)population (P1082)male population (P1540)female population (P1539)
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Male/female ratio in Czech municipalities
#defaultView:BarChart
SELECT DISTINCT ((?zeny / ?muzi) AS ?result) ?item ?itemLabel ?muzi ?zeny
WHERE
{
?item wdt:P31 wd:Q5153359 .
?item p:P1082 ?populace .
?populace a wikibase:BestRank .
?populace pq:P1540 ?muzi .
?populace pq:P1539 ?zeny .
SERVICE wikibase:label { bd:serviceParam wikibase:language "cs" } .
}
ORDER BY DESC(?result)
LIMIT 50
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v4("?muzi"):::projected
v3("?populace")
v6("?result")
v5("?zeny"):::projected
c11(["cs"]):::literal
c2(["wd:Q5153359"]):::iri
c9(["bd:serviceParam"]):::iri
c5(["wikibase:BestRank"]):::iri
v2 --"p:direct/P31"--> c2
v2 --"p:P1082"--> v3
v3 --"a"--> c5
v3 --"p:qualifier/P1540"--> v4
v3 --"p:qualifier/P1539"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind0[/"?zeny / ?muzi"/]
v5 --o bind0
v4 --o bind0
bind0 --as--o v6