What is {educated at} of {William Walker} that is {end time} is {1838-0-0} ?
From what school did William Walker graduate in 1838?
Which school did William Walker finish at 1838?
SELECT ?z WHERE { FILTER ( CONTAINS ( YEAR ( ?n ) , '1838' ) ) . resource:William_Walker property:educated_at ?n . ?n property:end_time ?n . ?n property:educated_at ?z }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q196401> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P69> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1838-0-0>
} 

SELECT ?obj WHERE { wd:Q196401 p:P69 ?s . ?s ps:P69 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1838')) }