Question: What is the connection between John Logan (the one that has the occupation of writer) to writer?
Choices:
narrative location
given name
broadcast by
home port
sex or gender
newspaper format
drafted by
allegiance
programming language
occupation
Answer: occupation
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "John Logan" . ?e_1 <occupation> ?e_3 . ?e_3 <pred:name> "writer" . ?e_2 <pred:name> "writer" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: writer
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: John Logan
function: And
dependencies: 1
2
function: Find
inputs: writer
function: QueryRelation
dependencies: 3
4