What is {position held} of {William Massey} that is {electoral district} is {Waitemata} ?
William Massey held what position in the electoral district Waitemata?
What position was held by William Massey in the electoral district Waitemata?
SELECT ?y WHERE { ?q property:electoral_district resource:Waitemata . resource:William_Massey property:position_held ?q . ?q property:position_held ?y }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q923806> .
?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/P768> <http://wikidata.dbpedia.org/resource/Q7960496>
} 

SELECT ?obj WHERE { wd:Q923806 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P768 wd:Q7960496 }