What is {occupation} of {Spock} that is {end time} is {2286-0-0} ?
In 2286 what is Spock's job?
What is Spock's occupation in 2286?
SELECT ?q WHERE { ?q property:end_time ?r . resource:Spock property:occupation ?q . ?q property:occupation ?q . FILTER ( CONTAINS ( YEAR ( ?r ) , '2286' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q16341> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P106> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2286-0-0>
} 

SELECT ?obj WHERE { wd:Q16341 p:P106 ?s . ?s ps:P106 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2286')) }