What is {position held} of {Kenneth Kaunda} that is {end time} is {1971-6-21} ?
What position did Kenneth Kaunda hold until 6-21-1971?
SELECT ?obj WHERE { wd:Q105480 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1971')) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q105480> .
?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> <1971-6-21>
} 

Until June 21st, 1971, in what capacity did Kenneth Kaunda serve?