Question: What is the connection between Kingdom of Italy (the one that is the country of Bergamo) to Milan (the one whose postal code is 20122)?
Choices:
nominated for
has effect
religious order
dedicated to
donated by
official language
had as last meal
capital
takes place in fictional universe
found
Answer: capital
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Kingdom of Italy" . ?e_3 <country> ?e_1 . ?e_3 <pred:name> "Bergamo" . ?e_2 <pred:name> "Milan" . ?e_2 <postal_code> ?pv . ?pv <pred:value> "20122" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Bergamo
function: Relate
dependencies: 0
inputs: country
forward
function: Find
inputs: Kingdom of Italy
function: And
dependencies: 1
2
function: Find
inputs: Milan
function: FilterStr
dependencies: 4
inputs: postal code
20122
function: QueryRelation
dependencies: 3
5