Question: How many towns in the United States have a population not equal to 15000000 or have an elevation of more than 50 meters above sea level?
Choices: 21
22
23
24
25
26
27
28
29
30
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "town of the United States" .  { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "15000000"^^xsd:double ) .  } UNION { ?e <elevation_above_sea_level> ?pv . ?pv <pred:unit> "metre" . ?pv <pred:value> ?v . FILTER ( ?v > "50"^^xsd:double ) .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: population
15000000
!=
function: FilterConcept
dependencies: 1
inputs: town of the United States
function: FindAll
function: FilterNum
dependencies: 3
inputs: elevation above sea level
50 metre
>
function: FilterConcept
dependencies: 4
inputs: town of the United States
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 22