What is the {globular cluster} with the {MAX(metallicity)} whose {discoverer or inventor} is {James Dunlop}  ?
Which galaxy discovered by James Dunlop has the highest metallicity?
What is the most metallic galaxy discovered by James Dunlop?
SELECT ?v WHERE { ?v property:metallicity ?t . ?v rdf:type ontology:globular_cluster . ?v property:discoverer_or_inventor resource:James_Dunlop }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q11276>.

?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/P2227>.
?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:Q11276 . ?ent wdt:P2227 ?obj . ?ent wdt:P61 wd:Q375158 } ORDER BY DESC(?obj)LIMIT 5 
NGC 6388 NGC 1846 NGC 6652 NGC 6352 NGC 6441