What is {position held} of {Paul VI} that is {end time} is {1963-6-21} ?
What job did Paul VI leave in 1963?
What position did Paul VI leave in June of 1963?
SELECT ?a WHERE { ?s property:end_time ?a . FILTER ( CONTAINS ( YEAR ( ?a ) , '1963' ) ) . ?s property:position_held ?a . resource:Paul_VI property:position_held ?s }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q16975> .
?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/P582> <1963-6-21>
} 

SELECT ?obj WHERE { wd:Q16975 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1963')) }