what is the {end time} for {James Madison} has {educated at} as {Princeton University} ?
When did James Madison complete Princeton University?
When did James Madison graduate from Princeton University?
SELECT ?a WHERE { ?e property:end_time ?a . ?e property:educated_at resource:Princeton_University . resource:James_Madison property:educated_at ?e }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q11813> .
?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> <http://wikidata.dbpedia.org/resource/Q21578> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q11813 p:P69 ?s . ?s ps:P69 wd:Q21578 . ?s pq:P582 ?value}