What is {position held} of {Ramsay MacDonald} that is {start time} is {1929-6-5} ?
Which was the position that Ramsay MacDonald held in 1929?
What position did Ramsay MacDonald hold on June 5, 1929?
SELECT ?l WHERE { ?j property:position_held ?l . FILTER ( CONTAINS ( YEAR ( ?l ) , '1929' ) ) . ?j property:start_time ?l . resource:Ramsay_MacDonald property:position_held ?j }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q166646> .
?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/P580> <1929-6-5>
} 

SELECT ?obj WHERE { wd:Q166646 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P580 ?x filter(contains(YEAR(?x),'1929')) }