Question: How is Waterloo (headed by a councillor) related to a councillor ?
Choices:
draft pick from school
religious order
creator
office held by head of government
screenwriter
student of
distributor
ethnic group
officially opened by
professional or sports partner
Answer: office held by head of government
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Waterloo" . ?e_1 <office_held_by_head_of_government> ?e_3 . ?e_3 <pred:name> "councillor" . ?e_2 <pred:name> "councillor" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: councillor
function: Relate
dependencies: 0
inputs: office held by head of government
backward
function: Find
inputs: Waterloo
function: And
dependencies: 1
2
function: Find
inputs: councillor
function: QueryRelation
dependencies: 3
4