what is the {elected in} for {Edward Heath} has {position held} as {Member of the 47th Parliament of the United Kingdom} ?
Name the year that Edward Heath was elected to the UK's 47th Parliament.
In what year was Edward Heath elected to the 47th Parliament of the United Kingdom?
SELECT ?l WHERE { ?n property:elected_in ?l . resource:Edward_Heath property:position_held ?n . ?n property:position_held resource:Member_of_the_47th_Parliament_of_the_United_Kingdom }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q128967> .
?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> <http://wikidata.dbpedia.org/resource/Q41582617> .
?statement <http://www.wikidata.org/entity/P2715> ?value. 
} 

SELECT ?value WHERE { wd:Q128967 p:P39 ?s . ?s ps:P39 wd:Q41582617 . ?s pq:P2715 ?value}