Question: What is the end time for william lamb, 2nd viscount melbourne has a position held as a Prime minister of the united Kingtom?
SPARQL (Wikidata): SELECT ?value WHERE { wd:Q312567 p:P39 ?s . ?s ps:P39 wd:Q14211 . ?s pq:P582 ?value}