query-fd8617d867135b7723c1a59c97db611c
Names of all cities around the world with a population larger than one million 11:35, 8 November 2019 (UTC)) talk (ויקיג'אנקיSuch a list would be very helpful for us Wikivoyagers. ::ויקיג'אנקי@
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#>
SELECT DISTINCT ?cityLabel ?population ?gps
WHERE
{
?city wdt:P31/wdt:P279* wd:Q515 .
?city wdt:P1082 ?population .
?city wdt:P625 ?gps .
FILTER (?population >= 1000000) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?city")
v3("?gps"):::projected
v1("?population"):::projected
a1((" "))
c8(["bd:serviceParam"]):::iri
c4(["wd:Q515"]):::iri
c10(["en"]):::literal
f0[["?population >= '1000000^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
v2 --"wdt:P1082"--> v1
v2 --"wdt:P625"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end