What is {position held} of {Edward the Confessor} that is {replaces} is {Harthacanute} ?
Harthacanute was replaced by Edward the Confessor who at the time held what position?
What was the position Edward the Confessor held when he replaced Harthacanute?
SELECT ?h WHERE { resource:Edward_the_Confessor property:position_held ?p . ?p property:replaces resource:Harthacanute . ?p property:position_held ?h }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q130005> .
?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/P1365> <http://wikidata.dbpedia.org/resource/Q190091>
} 

SELECT ?obj WHERE { wd:Q130005 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1365 wd:Q190091 }