What is {position held} of {John Major} and {elected in}
What function was held by using John Major and what yr used to be he elected in?
What position was held by John Major and what year was he elected in?
SELECT ?t ?p WHERE { ?o property:position_held ?p . resource:John_Major property:position_held ?o . ?o property:elected_in ?t . }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q9559> . ?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:Q9559 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P2715 ?value1 . }