What is the {rural district of Germany} with the {MAX(male population)} whose {instance of} is {rural district of Germany}  ?
What rural district in Germany has the highest male population?
What is the rural district name in the Germany which has more male population?
SELECT ?v WHERE { ?v rdf:type ontology:District . ?v property:male_population ?s . ?v rdf:type ontology:District }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q106658>.

?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1540>.
?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj1.

?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P31> .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q106658> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q106658 . ?ent wdt:P1540 ?obj . ?ent wdt:P31 wd:Q106658 } ORDER BY DESC(?obj)LIMIT 5 
Landkreis Weilheim in Upper Bavaria Pegnitz Landkreis Naila Pegnitz Landkreis Naila