What is the {star cluster} with the {MAX(apparent magnitude)} whose {discoverer or inventor} is {James Dunlop}  ?
What is the biggest galaxy discovered by James Dunlop?
Name the biggest galaxy discovered by James Dunlop.
SELECT ?r WHERE { ?r rdf:type ontology:star_cluster . ?r property:apparent_magnitude ?n . ?r property:discoverer_or_inventor resource:James_Dunlop }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q168845>.

?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/P1215>.
?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/Q375158> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q168845 . ?ent wdt:P1215 ?obj . ?ent wdt:P61 wd:Q375158 } ORDER BY DESC(?obj)LIMIT 5 
NGC 1929 NGC 2118 NGC 1826 NGC 1822 NGC 1938