What is {residence} of {Francisco Goya} and {end time}
Where and until when has Francisco Goya lived?
Where did Francisco Goya live and until when?
SELECT ?b ?a WHERE { resource:Francisco_Goya property:residence ?j . ?j property:residence ?a . ?j property:end_time ?b . }
select distinct ?dataprop1 ?obj 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> ?obj . ?statement <http://www.wikidata.org/entity/P580> ?dataprop1 . } 
SELECT ?value1 ?obj WHERE { wd:Q5432 p:P551 ?s . ?s ps:P551 ?obj . ?s pq:P582 ?value1 . }