What is {position held} of {Alp Arslan} that is {replaces} is {Tughril} ?
Alp Arslan replaced Tughrill at what position?
At what position did Alp Arslan replace Tughrill?
SELECT ?i WHERE { ?n property:position_held ?i . resource:Alp_Arslan property:position_held ?n . ?n property:replaces resource:Tughril }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q200193> .
?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/Q144565>
} 

SELECT ?obj WHERE { wd:Q200193 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1365 wd:Q144565 }