Question: How many Texas counties are an administrative division of South Dakota or have a population that is over 320000?
Choices:
11
12
13
14
15
16
17
18
19
20
Answer: 14
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Texas" .  { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "South Dakota" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "320000"^^xsd:double ) .  } }
Program:
function: Find
inputs: South Dakota
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 1
inputs: county of Texas
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
320000
>
function: FilterConcept
dependencies: 4
inputs: county of Texas
function: Or
dependencies: 2
5
function: Count
dependencies: 6