what is the {end time} for {Francisco Goya} has {residence} as {Quinta del Sordo} ?
On what date did Francisco Goya end his residence in Quinta del Sordo.
When did Francisco Goya end his residence in Quinta del Sordo?
SELECT ?b WHERE { ?e property:residence resource:Quinta_del_Sordo . resource:Francisco_Goya property:residence ?e . ?e property:end_time ?b }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q5432> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P551> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q2344241> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q5432 p:P551 ?s . ?s ps:P551 wd:Q2344241 . ?s pq:P582 ?value}