Question: What does John Adams (who was educated at Yale University) have to do with teacher?
Choices:
notable people with this condition
official color
manufacturer
location of formation
continent
affiliation
creator
genre
home port
occupation
Answer: occupation
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "John Adams" . ?e_1 <educated_at> ?e_3 . ?e_3 <pred:name> "Yale University" . ?e_2 <pred:name> "teacher" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Yale University
function: Relate
dependencies: 0
inputs: educated at
backward
function: Find
inputs: John Adams
function: And
dependencies: 1
2
function: Find
inputs: teacher
function: QueryRelation
dependencies: 3
4