What is {elected in} and {end cause} of {{Martin McGuinness} has {position held} as {Member of the 52nd Parliament of the United Kingdom}}
When did Martin McGuinness get chosen as a Member of the 52nd Parliament of the UK, and how long did he serve after that?
When was Martin McGuinness, Member of the 52nd Parliament of the United Kingdom, elected, and when did he serve till?
SELECT ?q ?u WHERE { ?w property:position_held resource:Member_of_the_52nd_Parliament_of_the_United_Kingdom . ?w property:elected_in ?q . resource:Martin_McGuinness property:position_held ?w . ?w property:end_cause ?u }
select distinct ?value1 ?value2 where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q57689> . ?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/Q36634044>. ?statement <http://www.wikidata.org/entity/P580> ?value1 . ?statement <http://www.wikidata.org/entity/P2842> ?value2 } 
SELECT ?value1 ?value2 WHERE { wd:Q57689 p:P39 ?s . ?s ps:P39 wd:Q36634044 . ?s pq:P2715 ?value1 . ?s pq:P1534 ?value2 }