what is the {end time} for {Accra} has {head of government} as {Enoch Teye Mensah} ?
When did Enoch Teye Mensah's time as head of government for Accra end?
When did Enoch Teye Mensah finish his time as head of government for Accra?
SELECT ?b WHERE { resource:Accra property:head_of_government ?s . ?s property:end_time ?b . ?s property:head_of_government resource:Enoch_Teye_Mensah }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q3761> .
?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/Q5379334> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q3761 p:P6 ?s . ?s ps:P6 wd:Q5379334 . ?s pq:P582 ?value}