Question: How many democracies have a population greater than 5.9 or a nominal GDP greater than 2500000000000 United States dollars?
Choices: 29
30
31
32
33
34
35
36
37
38
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "democracy" .  { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "5.9"^^xsd:double ) .  } UNION { ?e <nominal_GDP> ?pv . ?pv <pred:unit> "United States dollar" . ?pv <pred:value> ?v . FILTER ( ?v > "2500000000000"^^xsd:double ) .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: population
5.9
>
function: FilterConcept
dependencies: 1
inputs: democracy
function: FindAll
function: FilterNum
dependencies: 3
inputs: nominal GDP
2500000000000 United States dollar
>
function: FilterConcept
dependencies: 4
inputs: democracy
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 35