what is the {end time} for {David Trimble} has {position held} as {First Minister of Northern Ireland} ?
David Trimble, the First Minister of Northern Ireland, finishes at what time?
What time does the First Minister of Northern Ireland, David Trimble, finish?
SELECT ?i WHERE { resource:David_Trimble property:position_held ?i . ?i property:position_held resource:First_Minister_of_Northern_Ireland . ?i property:end_time ?i }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q192556> .
?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/Q22979263> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q192556 p:P39 ?s . ?s ps:P39 wd:Q22979263 . ?s pq:P582 ?value}