what is the {end time} for {Scott Carpenter} has {occupation} as {astronaut} ?
What is the date of death of astronaut Scott Carpenter?
What year did astronaut Scott Carpenter die?
SELECT ?o WHERE { resource:Scott_Carpenter property:occupation ?l . ?l property:end_time ?o . ?l property:occupation resource:astronaut }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q335503> .
?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> <http://wikidata.dbpedia.org/resource/Q11631> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q335503 p:P106 ?s . ?s ps:P106 wd:Q11631 . ?s pq:P582 ?value}