Question: What is the relationship between Casablanca (the one that received Academy Award for Best Director) and Humphrey Bogart?
Choices:
director of photography
soundtrack album
sponsor
partner
given name
costume designer
symptom of
professorship
godparent
cast member
Answer: cast member
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Casablanca" . ?e_1 <award_received> ?e_3 . ?e_3 <pred:name> "Academy Award for Best Director" . ?e_2 <pred:name> "Humphrey Bogart" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Academy Award for Best Director
function: Relate
dependencies: 0
inputs: award received
backward
function: Find
inputs: Casablanca
function: And
dependencies: 1
2
function: Find
inputs: Humphrey Bogart
function: QueryRelation
dependencies: 3
4