What is {position held} of {Tony Abbott} that is {replaced by} is {Kevin Andrews} ?
Remembering the replacement of Tony Abbot, what was the role that the Kevin Andrews took to replace him?
Kevin Andrews replaced Tony Abbott as what?
SELECT ?z WHERE { ?g property:position_held ?z . resource:Tony_Abbott property:position_held ?g . ?g property:replaced_by resource:Kevin_Andrews }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q348577> .
?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/Q6395733>
} 

SELECT ?obj WHERE { wd:Q348577 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q6395733 }