Question: How many unitary states there are whose total fertility rate is different to 5.9 or whose population is less than 37000?
Choices: 7
8
9
10
11
12
13
14
15
16
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "unitary state" .  { ?e <total_fertility_rate> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "5.9"^^xsd:double ) .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "37000"^^xsd:double ) .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: total fertility rate
5.9
!=
function: FilterConcept
dependencies: 1
inputs: unitary state
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
37000
<
function: FilterConcept
dependencies: 4
inputs: unitary state
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 16