What is {spouse} of {Kim Basinger} that is {end time} is {2002-1-1} ?
Who was the spouse for Kim Basinger until 2002?.
Who was Kim Basinger's husband until 2002?
SELECT ?v WHERE { ?v property:end_time ?p . FILTER ( CONTAINS ( YEAR ( ?p ) , '2002' ) ) . ?v property:spouse ?v . resource:Kim_Basinger property:spouse ?v }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q131380> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2002-1-1>
} 

SELECT ?obj WHERE { wd:Q131380 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2002')) }