What is the {dam} with the {MAX(installed capacity)} whose {instance of} is {hydroelectric power station}  ?
Give me the name of the hydroelectric dam that produces the most energy?
Which hydroelectric dam produces the most energy?
SELECT ?m WHERE { ?m rdf:type ontology:dam . ?m property:installed_capacity ?l . ?m rdf:type ontology:hydroelectric_power_station }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q12323>.

?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/P2109>.
?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/Q15911738> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q12323 . ?ent wdt:P2109 ?obj . ?ent wdt:P31 wd:Q15911738 } ORDER BY DESC(?obj)LIMIT 5 
Baihetan Dam Belo Monte Dam Wudongde Hydropower Station São Luiz do Tapajós Dam Xiangjiaba Dam