What is {partner} of {Katharine Hepburn} and {end time}
To whom did Katharine Hepburn get married and when did it end?
To whom did Katharine Hepburn get married and when did it end?
SELECT ?i ?h WHERE { resource:Katharine_Hepburn property:unmarried_partner ?y . ?y property:end_time ?i . . ?y property:unmarried_partner ?h }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q56016> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P451> . ?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:Q56016 p:P451 ?s . ?s ps:P451 ?obj . ?s pq:P582 ?value1 . }