What is {position held} of {John McCain} that is {electoral district} is {Arizona} ?
What was John McCain's elected position in Arizona?
What position was John McCain elected to in Arizona?
SELECT ?j WHERE { ?l property:position_held ?j . ?l property:electoral_district resource:Arizona . resource:John_McCain property:position_held ?l }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q10390> .
?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/Q816>
} 

SELECT ?obj WHERE { wd:Q10390 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P768 wd:Q816 }