What is {country of citizenship} of {Thomas Paine} that is {end time} is {1792-0-0} ?
Until 1972, where did Thomas Paine reside?
Where did Thomas Paine live until 1792?
SELECT ?p WHERE { ?o property:end_time ?n . FILTER ( CONTAINS ( YEAR ( ?n ) , '1792' ) ) . resource:Thomas_Paine property:country_of_citizenship ?o . ?o property:country_of_citizenship ?p }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q126462> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P27> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1792-0-0>
} 

SELECT ?obj WHERE { wd:Q126462 p:P27 ?s . ?s ps:P27 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1792')) }