What is {marry} of {Cassiopeia}, that has {has son} is {Andromeda} ?
"Which is {marry} of {Cassiopeia}, who {has son} is {Andromeda} ?"
"Which is {marry} of {Cassiopeia}, who {has son} is {Andromeda} ?"
SELECT ?o WHERE { ?o property:child resource:Andromeda . resource:Cassiopeia property:spouse ?o }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q207681> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?answer. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P40> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q161582> . }
SELECT ?answer WHERE { wd:Q207681 wdt:P26 ?answer . ?answer wdt:P40 wd:Q161582}
Cepheus, King of Aethiopia