What is {position held} of {Ferdinand Marcos} that is {replaced by} is {Corazon Aquino} ?
Give me the post name held by Ferdinand Marcos at the time of his replacement with Corazon Aquino?
What position did Ferdinand Marcos hold when he was replaced by Corazon Aquino?
SELECT ?f WHERE { ?x property:position_held ?f . resource:Ferdinand_Marcos property:position_held ?x . ?x property:replaced_by resource:Corazon_Aquino }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1463> .
?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/Q1480>
} 

SELECT ?obj WHERE { wd:Q1463 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q1480 }