What is {spouse} of {Aaliyah} and {end time}
Who is the companion of Aaliyah and when did they divorce?
Who is the spouse of Aaliyah and when did they divorce?
SELECT ?e ?u WHERE { ?q property:spouse ?u . ?q property:end_time ?e . . resource:Aaliyah property:spouse ?q }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q11617> . ?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:Q11617 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?value1 . }