What is {student of} of {Leonardo da Vinci} that is {end time} is {1477-1-1} ?
Who was a student of da Vinci's until 1477?
Who stopped being Leonardo da Vinci's student in 1477?
SELECT ?k WHERE { FILTER ( CONTAINS ( YEAR ( ?c ) , '1477' ) ) . ?z property:end_time ?c . resource:Leonardo_da_Vinci property:student_of ?z . ?z property:student_of ?k }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q762> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1066> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1477-1-1>
} 

SELECT ?obj WHERE { wd:Q762 p:P1066 ?s . ?s ps:P1066 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1477')) }