What is {spouse} of {Lisa Marie Presley} that is {end time} is {2004-5-16} ?
From whom was Lisa Marie Presley divorced as of May 16, 2004?
Who was no longer the spouse of Lisa Marie Presley on 16th May 2004?
SELECT ?q WHERE { FILTER ( CONTAINS ( YEAR ( ?p ) , '2004' ) ) . ?i property:end_time ?p . resource:Lisa_Marie_Presley property:spouse ?i . ?i property:spouse ?q }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q237324> .
?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> <2004-5-16>
} 

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