What is {spouse} of {Henry III of France} that is {end time} is {1589-8-2} ?
Who was the wife of Henry III of France in 1589?
Which spouse did Henry III of France have in 1589-8-2.
SELECT ?t WHERE { resource:Henry_III_of_France property:spouse ?y . ?y property:end_time ?o . ?y property:spouse ?t . FILTER ( CONTAINS ( YEAR ( ?o ) , '1589' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q53448> .
?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> <1589-8-2>
} 

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