What is {partner} of {Ben Affleck} that is {end time} is {1999-0-0} ?
Who is the partner of Ben Affleck who died at 1999-0-0?
SELECT ?obj WHERE { wd:Q483118 p:P451 ?s . ?s ps:P451 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1999')) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q483118> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P451> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1999-0-0>
} 

Name of the partner of Ben Affleck who died in 1999-0-0