What is the {training ship} with the {MIN(number of masts)} whose {operator} is {Seamester}  ?
-
operator}
SELECT ?c WHERE { ?c rdf:type ontology:training_ship . ?c property:operator resource:Seamester . . ?c property:number_of_masts ?b }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q660668>.

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

}
ORDER BY ASC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q660668 . ?ent wdt:P1099 ?obj . ?ent wdt:P137 wd:Q7440716. } ORDER BY ASC(?obj)LIMIT 5 
Ocean Star