What is the {municipality with town privileges in the Czech Republic} with the {MAX(mean age)} ?
In the Czech Republic, which municipality with town privileges has the highest mean age?
Which municipality with town privileges in the Czech Republic has the highest mean age?
SELECT ?y WHERE { ?y property:mean_age ?n . ?y rdf:type ontology:municipality_with_town_privileges_in_the_Czech_Republic }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q15978299>.
?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/P4442>.
?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:Q15978299 . ?ent wdt:P4442 ?obj } ORDER BY DESC(?obj)LIMIT 5 
Brno Prague