What is the {barque} with the {MAX(number of masts)} whose {instance of} is {barque}  ?
What is the name of the barque that has the most masts?
Name the barque with the most masts ?
SELECT ?u WHERE { ?u rdf:type ontology:barque . ?u property:number_of_masts ?k . ?u rdf:type ontology:barque }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q216057>.

?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/P1099>.
?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/Q216057> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q216057 . ?ent wdt:P1099 ?obj . ?ent wdt:P31 wd:Q216057 } ORDER BY DESC(?obj)LIMIT 5 
Dundee Afon Alaw Dundee Duyfken Breadalbane