What is {libretto by} of {Das Rheingold}, that has {famous books} is {Lohengrin} ?
What is libretto by Das Rheingold, which has a famous book called the Lohengrin?
What is libretto by Das Rheingold, which has a famous book called the Lohengrin?
SELECT ?g WHERE { ?g property:notable_work resource:Lohengrin . resource:Das_Rheingold property:librettist ?g }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q327717> . ?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> ?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/P800> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q23085> . }
SELECT ?answer WHERE { wd:Q327717 wdt:P87 ?answer . ?answer wdt:P800 wd:Q23085}
Richard Wagner