Question: How many North Carolina countries are there that border Franklin County (bordering Wake County) or their number of people is not equal to 3,7 million ?
Choices:
5
6
7
8
9
10
11
12
13
14
Answer: 11
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of North Carolina" .  { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "3700000"^^xsd:double ) .  } UNION { ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Franklin County" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Wake County" .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: population
3700000
!=
function: FilterConcept
dependencies: 1
inputs: county of North Carolina
function: Find
inputs: Wake County
function: Relate
dependencies: 3
inputs: shares border with
forward
function: Find
inputs: Franklin County
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: shares border with
forward
function: FilterConcept
dependencies: 7
inputs: county of North Carolina
function: Or
dependencies: 2
8
function: Count
dependencies: 9