What is {position held} of {Charles IV of France} that is {replaced by} is {Philip VI of France} ?
Charles IV of and Philip VI of France both held what position?
What position did both Charles IV of and Philip VI of France hold?
SELECT ?w WHERE { ?x property:replaced_by resource:Philip_VI_of_France . ?x property:position_held ?w . resource:Charles_IV_of_France property:position_held ?x }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q174964> .
?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/Q170586>
} 

SELECT ?obj WHERE { wd:Q174964 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q170586 }