Question: How many islands share a border with Elizabeth (whose postal code is 07208) or have a population greater than 7300?
Choices:
21
22
23
24
25
26
27
28
29
30
Answer: 26
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:name> "Elizabeth" . ?e_1 <postal_code> ?pv . ?pv <pred:value> "07208" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "7300"^^xsd:double ) .  } }
Program:
function: Find
inputs: Elizabeth
function: FilterStr
dependencies: 0
inputs: postal code
07208
function: Relate
dependencies: 1
inputs: shares border with
backward
function: FilterConcept
dependencies: 2
inputs: island
function: FindAll
function: FilterNum
dependencies: 4
inputs: population
7300
>
function: FilterConcept
dependencies: 5
inputs: island
function: Or
dependencies: 3
6
function: Count
dependencies: 7