What is {position held} of {Valéry Giscard d'Estaing} that is {end time} is {1981-5-21} ?
On May 21, 1989, what role did Valery Giscard d'Estaing have?
What position did  Valery Giscard d'Estaing hold on 5-21-1989?
SELECT ?u WHERE { ?l property:position_held ?u . resource:Valéry_Giscard_d'Estaing property:position_held ?l . FILTER ( CONTAINS ( YEAR ( ?s ) , '1981' ) ) . ?l property:end_time ?s }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q2124> .
?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> <1981-5-21>
} 

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