Created
March 8, 2022 13:14
-
-
Save davidsbatista/3f9310a25274b3e2063bee3e1f5f877d to your computer and use it in GitHub Desktop.
capitals of counties in the USA, with state and state code, filtered by population
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
| SELECT DISTINCT ?capital ?capital_label ?pop ?code WHERE { | |
| ?county wdt:P31/wdt:P279* wd:Q47168 . | |
| ?county wdt:P36 ?capital . | |
| ?capital rdfs:label ?capital_label . | |
| ?capital wdt:P1082 ?pop . | |
| ?county wdt:P131 ?state . | |
| ?state wdt:P31 wd:Q35657 . | |
| ?state wdt:P300 ?code . | |
| FILTER(LANG(?capital_label) = "en") | |
| FILTER(?pop >= 50000). | |
| } ORDER BY DESC(?pop) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment