Skip to content

Instantly share code, notes, and snippets.

@KMax
Created February 19, 2014 15:41
Show Gist options
  • Save KMax/9094613 to your computer and use it in GitHub Desktop.
Save KMax/9094613 to your computer and use it in GitHub Desktop.
List names of all cities, the name of its country and population. SPARQL Endpoint (http://dbpedia.org/sparql)
SELECT ?city_name ?country_name ?pop WHERE {
?city a dbpedia-owl:City;
dbpedia-owl:populationTotal ?pop;
rdfs:label ?city_name;
dbpedia-owl:country ?country .
?country rdfs:label ?country_name .
FILTER langMatches( lang(?city_name), "RU" )
FILTER langMatches( lang(?country_name), "RU" )
}
LIMIT 10
OFFSET 0
#Change "RU" to "*" or any other language tag
#Change OFFSET number to see other results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment