what is the {latest date} for {Hafez} has {date of death} as {1389-0-0} ?
What is the latest date recorded for Hafez whose date of death was on 1389-0-0?
SELECT ?value WHERE { wd:Q6240 p:P570 ?s . ?s ps:P570 ?x filter(contains(YEAR(?x),'1389')) . ?s pq:P1326 ?value}
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q6240> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P570> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <1389-0-0> .
?statement <http://www.wikidata.org/entity/P1326> ?value. 
} 

When was Hafez last recorded, his death took place on 1389-0-0?