what is the {replaced by} for {William Pitt, 1st Earl of Chatham} has {position held} as {Prime Minister of the United Kingdom} ?
William Pitt was replaced as 1st Earl of Chatham and Prime Minister of the United Kingdom by which person?
Who replaced William Pitt, 1st Earl of Chatham as the Prime Minister of the United Kingdom?
SELECT ?h WHERE { ?w property:position_held resource:Prime_Minister_of_the_United_Kingdom . resource:William_Pitt,_1st_Earl_of_Chatham property:position_held ?w . ?w property:replaced_by ?h }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q208663> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q14211> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q208663 p:P39 ?s . ?s ps:P39 wd:Q14211 . ?s pq:P1366 ?value}