What is {spouse} of {Gale Sondergaard} that is {end time} is {1971-1-1} ?
Having his married finished on 1971-1-1, who was Gale Sondergarrd?
Who was Gale Sondergaard married to until 1971-1-1?
SELECT ?n WHERE { ?s property:end_time ?i . FILTER ( CONTAINS ( YEAR ( ?i ) , '1971' ) ) . resource:Gale_Sondergaard property:spouse ?s . ?s property:spouse ?n }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q233845> .
?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> <1971-1-1>
} 

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