what is the {end time} for {Odessa} has {head of government} as {Eduard Gurwits} ?
In what year did the Head of Government of Odessa, Eduard Gurvits, resign?
When did Eduard Gurvits step down as the head of government of Odessa?
SELECT ?k WHERE { ?t property:head_of_government resource:Eduard_Gurwits . resource:Odessa property:head_of_government ?t . ?t property:end_time ?k }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1874> .
?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/Q609435> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q1874 p:P6 ?s . ?s ps:P6 wd:Q609435 . ?s pq:P582 ?value}