What is {position held} of {Stanley Baldwin} and {elected in}
What job did Stanley Baldwin have?
What position was Stanley Baldwin elected in?
SELECT ?f ?z WHERE { ?v property:position_held ?z . ?v property:elected_in ?f . . resource:Stanley_Baldwin property:position_held ?v }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q166635> . ?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/P580> ?dataprop1 . } 
SELECT ?value1 ?obj WHERE { wd:Q166635 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P2715 ?value1 . }