What is the {automobile model} with the {MAX(vehicle range)} whose {subclass of} is {compact car}  ?
Which compact car has the biggest range?
What kind of compact car has the greatest range?
SELECT ?e WHERE { ?e property:vehicle_range ?d . ?e rdf:type ontology:automobile_model . ?e rdf:type ontology:compact_car }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q3231690>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q3231690 . ?ent wdt:P2073 ?obj . ?ent wdt:P279 wd:Q946808 } ORDER BY DESC(?obj)LIMIT 5 
Tesla Model 3 Tesla Model 3