what is the {replaced by} for {Felipe González} has {position held} as {Prime Minister of Spain} ?
Who succeeded Felipe González as Prime Minister of Spain?
Who replaced Felipe González in the position of Prime Minister of Spain?
SELECT ?p WHERE { ?q property:replaced_by ?p . ?q property:position_held resource:Prime_Minister_of_Spain . resource:Felipe_González property:position_held ?q }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q156799> .
?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/Q844587> .
?statement <http://www.wikidata.org/entity/P1366> ?value. 
} 

SELECT ?value WHERE { wd:Q156799 p:P39 ?s . ?s ps:P39 wd:Q844587 . ?s pq:P1366 ?value}