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