Question: How  many metropolitan borough areas have a population more than 5400 or have a mean age that is not 40?
Choices:
14
15
16
17
18
19
20
21
22
23
Answer: 16
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "metropolitan borough" .  { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "5400"^^xsd:double ) .  } UNION { ?e <mean_age> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "40"^^xsd:double ) .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: population
5400
>
function: FilterConcept
dependencies: 1
inputs: metropolitan borough
function: FindAll
function: FilterNum
dependencies: 3
inputs: mean age
40
!=
function: FilterConcept
dependencies: 4
inputs: metropolitan borough
function: Or
dependencies: 2
5
function: Count
dependencies: 6