what is the {replaced by} for {Martin Ryle} has {position held} as {Astronomer Royal} ?
Who came after Martin Ryle as the Astronomer Royal?
Who replaced Martin Ryle as Astronomer Royal?
SELECT ?r WHERE { ?a property:position_held resource:Astronomer_Royal . ?a property:replaced_by ?r . resource:Martin_Ryle property:position_held ?a }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q190766> .
?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/Q369877> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q190766 p:P39 ?s . ?s ps:P39 wd:Q369877 . ?s pq:P1366 ?value}