Question: How many constitutional monarchies do we know whose life expectancy is different from 13.2 years or whose nominal GDP is below 4410 billion EUR ?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "constitutional monarchy" .  { ?e <life_expectancy> ?pv . ?pv <pred:unit> "year" . ?pv <pred:value> ?v . FILTER ( ?v != "13.2"^^xsd:double ) .  } UNION { ?e <nominal_GDP> ?pv . ?pv <pred:unit> "euro" . ?pv <pred:value> ?v . FILTER ( ?v < "410000000000"^^xsd:double ) .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: life expectancy
13.2 year
!=
function: FilterConcept
dependencies: 1
inputs: constitutional monarchy
function: FindAll
function: FilterNum
dependencies: 3
inputs: nominal GDP
410000000000 euro
<
function: FilterConcept
dependencies: 4
inputs: constitutional monarchy
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 3