Question: How many Alabama counties have the population other than 670,000 or are within administration of Alabama  (the one that contains Mobile County) administrative division?
Choices:
5
6
7
8
9
10
11
12
13
14
Answer: 10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Alabama" .  { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "670000"^^xsd:double ) .  } UNION { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Alabama" . ?e_2 <located_in_the_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "Mobile County" .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: population
670000
!=
function: FilterConcept
dependencies: 1
inputs: county of Alabama
function: Find
inputs: Mobile County
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Alabama
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 7
inputs: county of Alabama
function: Or
dependencies: 2
8
function: Count
dependencies: 9