Question: What Italy province borders the Province of Potenza and has local dialing code 0828?
Choices:
Province of Potenza
Province of Brescia
Province of Como
Province of Turin
Province of Naples
Province of Rome
Province of Palermo
Province of Cuneo
province of Milan
Province of Salerno
Program:
function: Find
inputs: Province of Potenza
function: Relate
dependencies: 0
inputs: shares border with
forward
function: FilterConcept
dependencies: 1
inputs: province of Italy
function: FindAll
function: FilterStr
dependencies: 3
inputs: local dialing code
0828
function: FilterConcept
dependencies: 4
inputs: province of Italy
function: And
dependencies: 2
5
function: What
dependencies: 6
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "province of Italy" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Province of Potenza" .  ?e <local_dialing_code> ?pv . ?pv <pred:value> "0828" .  }
Answer: Province of Salerno