what is the {end time} for {Pyotr Stolypin} has {position held} as {List of Ministers of Interior of Russia} ?
What year was Pyotr Stolypin's last as the Minister of the Interior of Russia?
When did Pyotr Stolypin stop being the Minister of the Interior of Russia?
SELECT ?o WHERE { resource:Pyotr_Stolypin property:position_held ?l . ?l property:end_time ?o . ?l property:position_held resource:list_of_Ministers_of_Interior_of_Russia }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q138487> .
?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/Q1518581> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q138487 p:P39 ?s . ?s ps:P39 wd:Q1518581 . ?s pq:P582 ?value}