Question: What position is held by Ramsay MacDonald and when was he elected?
Paraphrase: What function is held through Ramsay MacDonald and when was once he elected?
SPARQL (Wikidata): SELECT ?value1 ?obj WHERE { wd:Q166646 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P2715 ?value1 . }