What is {husbands} of {book by} of {Goldilocks} ?
Who did the writer of Goldilocks marry?
Who is the husband of the author of the book Goldilocks?
SELECT ?i WHERE { resource:Goldilocks property:librettist ?t . ?t property:spouse ?i }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q5580199> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P87>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?X . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?X. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q5580199 wdt:P87 ?X . ?X wdt:P26 ?answer}
Jean Kerr Walter Kerr