What is {position held} of {John F. Kennedy} and {elected in}
What position does John F. Kennedy hold and what position was he chosen in?
What position does John F. Kennedy hold and what position was he elected in?
SELECT ?z ?o WHERE { ?r property:position_held ?o . ?r property:elected_in ?z . . resource:John_F._Kennedy property:position_held ?r }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q9696> . ?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:Q9696 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P2715 ?value1 . }