Question: How many New Jersey cities share a border with Teaneck or have the local-dialing code 908?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 3
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city in New Jersey" .  { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Teaneck" .  } UNION { ?e <local_dialing_code> ?pv . ?pv <pred:value> "908" .  } }
Program:
function: Find
inputs: Teaneck
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: city in New Jersey
function: FindAll
function: FilterStr
dependencies: 3
inputs: local dialing code
908
function: FilterConcept
dependencies: 4
inputs: city in New Jersey
function: Or
dependencies: 2
5
function: Count
dependencies: 6