Question: How is Oscar, whose composer is Elmer Bernstein, related to Peter Riegert?
Choices:
depicted by
next higher rank
airline hub
has cause
cast member
has immediate cause
child astronomical body
source of income
official symbol
medical condition
Program:
function: Find
inputs: Elmer Bernstein
function: Relate
dependencies: 0
inputs: composer
backward
function: Find
inputs: Oscar
function: And
dependencies: 1
2
function: Find
inputs: Peter Riegert
function: QueryRelation
dependencies: 3
4
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Oscar" . ?e_1 <composer> ?e_3 . ?e_3 <pred:name> "Elmer Bernstein" . ?e_2 <pred:name> "Peter Riegert" . ?e_1 ?p ?e_2 .  }
Answer: cast member