what is the {replaces} for {James Stanhope, 1st Earl Stanhope} has {position held} as {Chancellor of the Exchequer} ?
Who became the new Chancellor of the Exchequer after James Stanhope?
Who replaced James Stanhope as Chancellor of the Exchequer?
SELECT ?m WHERE { resource:James_Stanhope,_1st_Earl_Stanhope property:position_held ?g . ?g property:position_held resource:Chancellor_of_the_Exchequer . ?g property:replaces ?m }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q332603> .
?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/Q531471> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q332603 p:P39 ?s . ?s ps:P39 wd:Q531471 . ?s pq:P1365 ?value}