What is {position held} of {John Jay} that is {replaced by} is {William Carmichael} ?
When William Carmichael took over for John Jay, what position did Jay hold?
What position did William Carmichael replace John Jay in?
SELECT ?o WHERE { ?g property:replaced_by resource:William_Carmichael . ?g property:position_held ?o . resource:John_Jay property:position_held ?g }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q310847> .
?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> ?obj .
?statement <http://www.wikidata.org/entity/P1366> <http://wikidata.dbpedia.org/resource/Q8006569>
} 

SELECT ?obj WHERE { wd:Q310847 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q8006569 }