what is the {end time} for {Kyrgyzstan} has {head of state} as {Kurmanbek Bakiyev} ?
End date of Kurmanbek Bakiyev  as head of state for Kyrgyzstan?
When did Kurmanbek Bakiyev end as head of state for Kyrgyzstan?
SELECT ?m WHERE { resource:Kyrgyzstan property:head_of_state ?w . ?w property:head_of_state resource:Kurmanbek_Bakiyev . ?w property:end_time ?m }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q813> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P35> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q484816> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q813 p:P35 ?s . ?s ps:P35 wd:Q484816 . ?s pq:P582 ?value}