I want to retrieve with SPARQL the list of the italian cities with more than 100k of population and I'm using the following query:
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?city ?name ?pop WHERE {
?city a dbo:Settlement .
?city foaf:name ?name .
?city dbo:populationTotal ?pop .
?city dbo:country ?country .
?city dbo:country dbpedia:Italy .
FILTER (?pop > 100000)
}
In the results I get for example in two different lines (which represent the same entity, but with different names):
http://dbpedia.org/resource/Bologna "Bologna"@en 384038
http://dbpedia.org/resource/Bologna "Comune di Bologna"@en 384038
How can I use SELECT DISTINCT
only in the column ?city
but still having as output the outher columns?