What is the {quasar} with the {MAX(redshift)} whose {discoverer or inventor} is {William Herschel}  ?
What quasar did William Herschel invent with the highest redshift?
What is the quasar with the highest redshift whose discoverer or inventor is William Herschel?
SELECT ?w WHERE { ?w rdf:type ontology:quasar . ?w property:redshift ?u . ?w property:discoverer_or_inventor resource:William_Herschel }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q83373>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q83373 . ?ent wdt:P1090 ?obj . ?ent wdt:P61 wd:Q14277 } ORDER BY DESC(?obj)LIMIT 5 
NGC 5993 NGC 7720 NGC 6150 NGC 5352 NGC 5352