What is the {country} with the {MAX(water as percent of area)} whose {diplomatic relation} is {Taiwan}  ?
What country has the highest water percent of area whose diplomatic relation is Taiwan ?
What is the country with the highest water as percent of area whose diplomatic relation is Taiwan ?
SELECT ?w WHERE { ?w rdf:type ontology:country . ?w property:water_as_percent_of_area ?j . ?w property:diplomatic_relation resource:Taiwan }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q6256>.

?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/P2927>.
?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/P530> .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q865> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q6256 . ?ent wdt:P2927 ?obj . ?ent wdt:P530 wd:Q865 } ORDER BY DESC(?obj)LIMIT 5 
The Bahamas Netherlands Uganda India Peru