What is {position held} of {Robert Mugabe} that is {end time} is {1998-6-8} ?
In 1998, what position did Robert Mugabe have?
What position did Robert Mugabe hold in 1998?
SELECT ?z WHERE { ?j property:end_time ?m . FILTER ( CONTAINS ( YEAR ( ?m ) , '1998' ) ) . resource:Robert_Mugabe property:position_held ?j . ?j property:position_held ?z }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q10707> .
?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> <1998-6-8>
} 

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