What is {position held} of {Calvin Coolidge} that is {end time} is {1923-8-2} ?
What job did Calvin Coolidge have until August 2, 1923?
Calvin Coolidge held what position until 1923-8-2?
SELECT ?m WHERE { resource:Calvin_Coolidge property:position_held ?h . ?h property:end_time ?m . FILTER ( CONTAINS ( YEAR ( ?m ) , '1923' ) ) . ?h property:position_held ?m }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q36023> .
?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> <1923-8-2>
} 

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