what is the {end time} for {Thaddeus Stevens} has {position held} as {United States representative} ?
When did Thaddeus Stevens quit as UN Representative?
What was the end time for Thaddeus Stevens who held position as United States representative?
SELECT ?h WHERE { resource:Thaddeus_Stevens property:position_held ?c . ?c property:position_held resource:United_States_representative . ?c property:end_time ?h }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1353767> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q13218630> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q1353767 p:P39 ?s . ?s ps:P39 wd:Q13218630 . ?s pq:P582 ?value}