Question: What year was Edward Smith-Stanley's last year as Prime Minister of the United Kingdom?
Paraphrase: In which year did Edward Smith-Stanley leave his post of Prime Minister for the united Kingdom?
SPARQL (Wikidata): SELECT ?value WHERE { wd:Q237829 p:P39 ?s . ?s ps:P39 wd:Q14211 . ?s pq:P582 ?value}