What is the {human} with the {MAX(Erdős number)} whose {member of} is {American Mathematical Society}  ?
Which American Mathematical Society member has the highest number of Erdős?
Which member of the American Mathematical Society has the highest Erdős number?
SELECT ?u WHERE { ?u property:Erdős_number ?r . ?u rdf:type ontology:human . ?u property:member_of resource:American_Mathematical_Society }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q5>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q5 . ?ent wdt:P2021 ?obj . ?ent wdt:P463 wd:Q465654 } ORDER BY DESC(?obj)LIMIT 5 
James Arthur Martin Hairer Theodore von Kármán Michael Atiyah Ngô Bảo Châu