What is the {human} with the {MIN(Erdős number)} whose {occupation} is {mathematician}  ?
Who is the mathematician with the minimum Erdős number?
Who is the {human} with the {MIN(Erdős number)} whose {occupation} is {mathematician} ?
SELECT ?g WHERE { ?g property:occupation resource:mathematician . . ?g property:Erdős_number ?n . ?g rdf:type ontology:human }
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/P106> .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q170790> .

}
ORDER BY ASC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q5 . ?ent wdt:P2021 ?obj . ?ent wdt:P106 wd:Q170790. } ORDER BY ASC(?obj)LIMIT 5 
Paul Erdős Maria Klawe Frances Yao Pál Turán Esther Szekeres