What is {position held} of {Mahavira} that is {replaces} is {Parshvanatha} ?
Give me the name of the position in which Mahavira replace Parshvanatha for?
Which position did Mahavira replace Parshvanatha for?
SELECT ?g WHERE { ?s property:replaces resource:Parshvanatha . resource:Mahavira property:position_held ?s . ?s property:position_held ?g }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q9422> .
?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/Q1400271>
} 

SELECT ?obj WHERE { wd:Q9422 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1365 wd:Q1400271 }