what is the {end time} for {Roger B. Taney} has {position held} as {United States Attorney General} ?
When did Roger B. Taney step down from US Attorney General?
When did Roger B. Taney stop holding the position of United States Attorney General?
SELECT ?m WHERE { ?j property:end_time ?m . ?j property:position_held resource:United_States_Attorney_General . resource:Roger_B._Taney property:position_held ?j }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q359470> .
?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/Q636207> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q359470 p:P39 ?s . ?s ps:P39 wd:Q636207 . ?s pq:P582 ?value}