What is {spouse} of {Barbara Walters} and {end time}
Who was the spouse of Barbara Walters and when was the end of the marriage?
Who was Barbara Walters's spouse and when did the marriage end?
SELECT ?k ?j WHERE { ?e property:end_time ?k . . ?e property:spouse ?j . resource:Barbara_Walters property:spouse ?e }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q231417> . ?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:Q231417 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?value1 . }