Question: What position did Nursultan Nazarbayev hold that ended on July 27th, 1989?
SPARQL (Wikidata): SELECT ?obj WHERE { wd:Q57394 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1989')) }