What is {position held} of {James Callaghan} and {elected in}
What position is held by James Callaghan and when was he elected?
What position is held by James Callaghan and when was he elected?
SELECT ?r ?h WHERE { ?d property:position_held ?h . ?d property:elected_in ?r . . resource:James_Callaghan property:position_held ?d }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q9576> . ?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:Q9576 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P2715 ?value1 . }