What is {spouse} of {Leopold I, Holy Roman Emperor} that is {end time} is {1673-0-0} ?
Name the woman left by Holy Roman Emperor Leopold I who ended a relationship with her, during 1673?.
In 1673, Holy Roman Emperor Leopold I ended a relationship with which woman?
SELECT ?i WHERE { resource:Leopold_I property:spouse ?h . ?h property:end_time ?l . ?h property:spouse ?i . FILTER ( CONTAINS ( YEAR ( ?l ) , '1673' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q150494> .
?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> <1673-0-0>
} 

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