What is {position held} of {George W. Bush} that is {end time} is {2009-1-20} ?
What was the title of George W. Bush in January of 2009?
What position did George W. Bush have on January 20, 2009?
SELECT ?k WHERE { resource:George_W._Bush property:position_held ?k . ?k property:end_time ?j . FILTER ( CONTAINS ( YEAR ( ?j ) , '2009' ) ) . ?k property:position_held ?k }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q207> .
?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> <2009-1-20>
} 

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