What is {position held} of {Oliver Cromwell} that is {end time} is {1649-0-0} ?
Oliver Cromwell left which position in 1649?
What position did Oliver Cromwell leave in 1649?
SELECT ?i WHERE { ?y property:position_held ?i . ?y property:end_time ?i . FILTER ( CONTAINS ( YEAR ( ?i ) , '1649' ) ) . resource:Oliver_Cromwell property:position_held ?y }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q44279> .
?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> <1649-0-0>
} 

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