Question: What number of metropolitan areas have Independence (the one whose local dialing code is 816) as a part or doesn't have a population of 680000?
Choices:
6
7
8
9
10
11
12
13
14
15
Answer: 8
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "metropolitan area" .  { ?e_1 <part_of> ?e . ?e_1 <pred:name> "Independence" . ?e_1 <local_dialing_code> ?pv . ?pv <pred:value> "816" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "680000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Independence
function: FilterStr
dependencies: 0
inputs: local dialing code
816
function: Relate
dependencies: 1
inputs: part of
forward
function: FilterConcept
dependencies: 2
inputs: metropolitan area
function: FindAll
function: FilterNum
dependencies: 4
inputs: population
680000
!=
function: FilterConcept
dependencies: 5
inputs: metropolitan area
function: Or
dependencies: 3
6
function: Count
dependencies: 7