Question: How many New Jersey cities are at zip code 07513 or have a population below 1600000?
Choices:
14
15
16
17
18
19
20
21
22
23
Answer: 15
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city in New Jersey" .  { ?e <postal_code> ?pv . ?pv <pred:value> "07513" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "1600000"^^xsd:double ) .  } }
Program:
function: FindAll
function: FilterStr
dependencies: 0
inputs: postal code
07513
function: FilterConcept
dependencies: 1
inputs: city in New Jersey
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
1600000
<
function: FilterConcept
dependencies: 4
inputs: city in New Jersey
function: Or
dependencies: 2
5
function: Count
dependencies: 6