what is the {replaces} for {Abdalá Bucaram} has {position held} as {Mayor of Guayaquil} ?
Abdala Bucaram's replacement as May of Guayaquil?
Who replaced Abdala Bucaram as May of Guayaquil?
SELECT ?h WHERE { ?w property:replaces ?h . resource:Abdalá_Bucaram_Ortiz property:position_held ?w . ?w property:position_held resource:Mayor_of_Guayaquil }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q307701> .
?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> <http://wikidata.dbpedia.org/resource/Q5663928> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q307701 p:P39 ?s . ?s ps:P39 wd:Q5663928 . ?s pq:P1365 ?value}