What is {member of sports team} of {Marco van Basten} that is {end time} is {1987-1-1} ?
On Jan 1st 1987 what team did Marco van Basten leave
What sports team did athlete Marco van Basten leave after Jan. 1st, 1987?
SELECT ?g WHERE { resource:Marco_van_Basten property:member_of_sports_team ?e . FILTER ( CONTAINS ( YEAR ( ?o ) , '1987' ) ) . ?e property:end_time ?o . ?e property:member_of_sports_team ?g }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q483629> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P54> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1987-1-1>
} 

SELECT ?obj WHERE { wd:Q483629 p:P54 ?s . ?s ps:P54 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1987')) }