what is the {end time} for {Louis XVIII of France} has {spouse} as {Marie Joséphine of Savoy} ?
When did Louis XVIII of France, husband of Marie Josephine of Savoy, die?
when is the {end time} for {Louis XVIII of France} tha has {spouse} as {Marie Joséphine of Savoy} ?
SELECT ?q WHERE { ?y property:end_time ?q . ?y property:spouse resource:Marie_Joséphine_of_Savoy . resource:Louis_XVIII_of_France property:spouse ?y }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q7750> .
?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> <http://wikidata.dbpedia.org/resource/Q231844> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q7750 p:P26 ?s . ?s ps:P26 wd:Q231844 . ?s pq:P582 ?value}