Question: How many administrative territorial entities of Canada share a border with Saskatchewan (whose population is 1132640) or are the residence of Margaret Atwood?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "administrative territorial entity of Canada" .  { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Saskatchewan" . ?e_1 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "1132640"^^xsd:double .  } UNION { ?e_1 <residence> ?e . ?e_1 <pred:name> "Margaret Atwood" .  } }
Program:
function: Find
inputs: Saskatchewan
function: FilterNum
dependencies: 0
inputs: population
1132640
=
function: Relate
dependencies: 1
inputs: shares border with
backward
function: FilterConcept
dependencies: 2
inputs: administrative territorial entity of Canada
function: Find
inputs: Margaret Atwood
function: Relate
dependencies: 4
inputs: residence
forward
function: FilterConcept
dependencies: 5
inputs: administrative territorial entity of Canada
function: Or
dependencies: 3
6
function: Count
dependencies: 7