What is {spouse} of {Ingrid Bergman} and {end time}
Who did Ingmar Bergman marry and when did they divorce?
To whom did Ingmar Bergman got married and when did it ended?
SELECT ?c ?b WHERE { resource:Ingrid_Bergman property:spouse ?t . ?t property:spouse ?b . ?t property:end_time ?c . }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q43247> . ?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:Q43247 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?value1 . }