Question: How many islands share a border with the New Jersey city that has a postal code of 07002?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "island" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "city in New Jersey" . ?e_1 <postal_code> ?pv . ?pv <pred:value> "07002" .   }
Program:
function: FindAll
function: FilterStr
dependencies: 0
inputs: postal code
07002
function: FilterConcept
dependencies: 1
inputs: city in New Jersey
function: Relate
dependencies: 2
inputs: shares border with
backward
function: FilterConcept
dependencies: 3
inputs: island
function: Count
dependencies: 4