What is the {tank locomotive} with the {MAX(number of cylinders)} whose {wheel arrangement} is {0-4-0T}  ?
Which tank locomotive with a 0-4-OT wheel configuration has the most cylinders?
Which tank locomotive has the highest number of cylinders with a 0-4-OT wheel arrangement?
SELECT ?p WHERE { ?p property:number_of_cylinders ?y . ?p rdf:type ontology:tank_locomotive . ?p property:wheel_arrangement resource:0-4-0T }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q785745>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q785745 . ?ent wdt:P1100 ?obj . ?ent wdt:P2978 wd:Q26234727 } ORDER BY DESC(?obj)LIMIT 5 
R.B. 2 R.B. 3 R.B. 1 Kerr, Stuart and Company 1015 “Pecauville” Eleonore