What is {spouse} of {John Steinbeck} and {end time}
Who were John Steinbeck's life partners and when did each of them die?
Who were John Steinbeck's spouses and when did each of them die?
SELECT ?w ?h WHERE { resource:John_Steinbeck property:spouse ?k . ?k property:spouse ?h . ?k property:end_time ?w . }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q39212> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj . ?statement <http://www.wikidata.org/entity/P580> ?dataprop1 . } 
SELECT ?value1 ?obj WHERE { wd:Q39212 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?value1 . }