What is the {municipality of Catalonia} with the {MAX(population)} ?
What part of Catalonia has the highest population?
What is the municipality of Catalonia that has the highest population?
SELECT ?m WHERE { ?m property:population ?x . ?m rdf:type ontology:municipality_of_Catalonia }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q33146843>.
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1082>.
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .}
ORDER BY DESC(?obj)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q33146843 . ?ent wdt:P1082 ?obj } ORDER BY DESC(?obj)LIMIT 5 
Barcelona L'Hospitalet de Llobregat Terrassa Badalona Sabadell