What is {position held} of {Mary II of England} that is {start time} is {1689-0-0} ?
Mary II of England held what title in 1689?
What was the position held by Mary II of England in the year 1689?
SELECT ?q WHERE { ?e property:start_time ?v . resource:Mary_II property:position_held ?e . ?e property:position_held ?q . FILTER ( CONTAINS ( YEAR ( ?v ) , '1689' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q130812> .
?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> <1689-0-0>
} 

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