What is {position held} of {Henry Campbell-Bannerman} and {elected in}
which position Henry Campbell-Bannerman holds and when did he select?
which position Henry Campbell-Bannerman holds and when did he select?
SELECT ?h ?r WHERE { ?m property:elected_in ?h . . ?m property:position_held ?r . resource:Henry_Campbell-Bannerman property:position_held ?m }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q106618> . ?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:Q106618 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P2715 ?value1 . }