What is {member of} of {Ben Bernanke} that is {end time} is {2005-6-21} ?
What office did Ben Bernanake serve when he left in 2005?
What was Ben Bernanke a member of when he left in June of 2005?
SELECT ?u WHERE { ?f property:member_of ?u . ?f property:end_time ?k . resource:Ben_Bernanke property:member_of ?f . FILTER ( CONTAINS ( YEAR ( ?k ) , '2005' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q201795> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P463> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2005-6-21>
} 

SELECT ?obj WHERE { wd:Q201795 p:P463 ?s . ?s ps:P463 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2005')) }