Created
May 11, 2018 09:56
-
-
Save trolleway/bc84f7c3b6c7ceaf148f744ac4a3b016 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Largest cities per administrative entity of Russia | |
SELECT DISTINCT ?city ?cityLabel ?population ?country ?countryLabel ?loc WHERE { | |
{ | |
SELECT (MAX(?population) AS ?population) ?country WHERE { | |
?city wdt:P31/wdt:P279* wd:Q515 . | |
?city wdt:P1082 ?population . | |
?city wdt:P131 ?country . | |
?country wdt:P17 wd:Q159 . | |
} | |
GROUP BY ?country | |
ORDER BY DESC(?population) | |
} | |
?city wdt:P31/wdt:P279* wd:Q515 . | |
?city wdt:P1082 ?population . | |
?city wdt:P131 ?country . | |
?city wdt:P625 ?loc . | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language "ru" . | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment