Question: What position did Mary McAleese have and when did she stop?
Paraphrase: What position did Mary McAleese have and when did she stop?
SPARQL (Wikidata): SELECT ?value1 ?obj WHERE { wd:Q174662 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P582 ?value1 . }