what is the {end time} for {Republic of Tatarstan} has {head of government} as {Röstäm Miñnexanov} ?
When did the Republic of Tartarstan end when Rostam Minnexanov was head of government?
When is the end time of the Republic of Tartarstan whom Rostam Minnexanov was head of government?
SELECT ?v WHERE { ?f property:head_of_government resource:Rustam_Minnikhanov . ?f property:end_time ?v . resource:Republic_of_Tatarstan property:head_of_government ?f }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q5481> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P6> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q983503> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q5481 p:P6 ?s . ?s ps:P6 wd:Q983503 . ?s pq:P582 ?value}