Question: How many California counties are located on terrain feature Asia (the one that is the continent that Brunei locates) or have a population greater than 780,000?
Choices: 12
13
14
15
16
17
18
19
20
21
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of California" .  { ?e <located_on_terrain_feature> ?e_1 . ?e_1 <pred:name> "Asia" . ?e_2 <continent> ?e_1 . ?e_2 <pred:name> "Brunei" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "780000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Brunei
function: Relate
dependencies: 0
inputs: continent
forward
function: Find
inputs: Asia
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located on terrain feature
backward
function: FilterConcept
dependencies: 4
inputs: county of California
function: FindAll
function: FilterNum
dependencies: 6
inputs: population
780000
>
function: FilterConcept
dependencies: 7
inputs: county of California
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 12