What is {position held} of {Mariano Rajoy} that is {elected in} is {Spanish general election, 2016} ?
What political role did Mariano Rajoy take over in 2016?
What is the position held by Mariano Rajoy who was elected in Spanish general election, 2016?
SELECT ?k WHERE { ?y property:elected_in resource:2016_Spanish_general_election . ?y property:position_held ?k . resource:Mariano_Rajoy property:position_held ?y }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q10819> .
?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/P2715> <http://wikidata.dbpedia.org/resource/Q22812047>
} 

SELECT ?obj WHERE { wd:Q10819 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P2715 wd:Q22812047 }