Question: How many democracies whose total fertility rate is less than 1.7 or that surrounds the enclave Holy Roman Empire?
Choices:
3
4
5
6
7
8
9
10
11
12
Answer: 10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "democracy" .  { ?e <total_fertility_rate> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "1.7"^^xsd:double ) .  } UNION { ?e_1 <enclave_within> ?e . ?e_1 <pred:name> "Holy Roman Empire" .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: total fertility rate
1.7
<
function: FilterConcept
dependencies: 1
inputs: democracy
function: Find
inputs: Holy Roman Empire
function: Relate
dependencies: 3
inputs: enclave within
forward
function: FilterConcept
dependencies: 4
inputs: democracy
function: Or
dependencies: 2
5
function: Count
dependencies: 6