What is {position held} of {Mieszko I} that is {replaced by} is {Bolesław I Chrobry} ?
What position was held by Mieszko when he was replaced by Boleslaw I Chrobry?
Name the position held by Mieszko when he is replaced by Boleslaw I Chrobry?
SELECT ?i WHERE { resource:Mieszko_I property:position_held ?e . ?e property:replaced_by resource:Bolesław_I_the_Brave . ?e property:position_held ?i }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q53435> .
?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/Q53436>
} 

SELECT ?obj WHERE { wd:Q53435 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q53436 }