Question: What does One Flew Over the Cuckoo's Nest (whose producer is Michael Douglas) have to do with prison?
Choices:
located in or next to body of water
official symbol
main subject
place of birth
feast day
territory claimed by
sexual orientation
film regional debut venue
drug used for treatment
programming paradigm
Answer: main subject
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "One Flew Over the Cuckoo's Nest" . ?e_1 <producer> ?e_3 . ?e_3 <pred:name> "Michael Douglas" . ?e_2 <pred:name> "prison" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Michael Douglas
function: Relate
dependencies: 0
inputs: producer
backward
function: Find
inputs: One Flew Over the Cuckoo's Nest
function: And
dependencies: 1
2
function: Find
inputs: prison
function: QueryRelation
dependencies: 3
4