Question: What is the relationship between a screenwriter and David Foster who was a physician?
Choices:
organisation directed from the office or person
costume designer
programming paradigm
season starts
occupation
famous people
location of final assembly
has parts of the class
voice actor
board member
Answer: occupation
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "David Foster" . ?e_1 <occupation> ?e_3 . ?e_3 <pred:name> "physician" . ?e_2 <pred:name> "screenwriter" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: physician
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: David Foster
function: And
dependencies: 1
2
function: Find
inputs: screenwriter
function: QueryRelation
dependencies: 3
4