Question: How many republics are there that surround Venezuela as an enclave or have less than 2,900,000 inhabitants ?
Choices:
7
8
9
10
11
12
13
14
15
16
Answer: 13
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "republic" .  { ?e_1 <enclave_within> ?e . ?e_1 <pred:name> "Venezuela" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "2900000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Venezuela
function: Relate
dependencies: 0
inputs: enclave within
forward
function: FilterConcept
dependencies: 1
inputs: republic
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
2900000
<
function: FilterConcept
dependencies: 4
inputs: republic
function: Or
dependencies: 2
5
function: Count
dependencies: 6