What is {spouse} of {Ingmar Bergman} and {end time}
Who did Ingmar Bergman wed and when did the marriage conclusion?
Who did Ingmar Bergman marry and when did the marriage end?
SELECT ?t ?q WHERE { resource:Ingmar_Bergman property:spouse ?k . ?k property:spouse ?q . ?k property:end_time ?t . }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q7546> . ?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:Q7546 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?value1 . }