Question: How many Oregon counties border Lake County, population 7820, or have a population different from 82000000?
Choices:
12
13
14
15
16
17
18
19
20
21
Answer: 14
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Oregon" .  { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Lake County" . ?e_1 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "7820"^^xsd:double .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "82000000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Lake County
function: FilterNum
dependencies: 0
inputs: population
7820
=
function: Relate
dependencies: 1
inputs: shares border with
backward
function: FilterConcept
dependencies: 2
inputs: county of Oregon
function: FindAll
function: FilterNum
dependencies: 4
inputs: population
82000000
!=
function: FilterConcept
dependencies: 5
inputs: county of Oregon
function: Or
dependencies: 3
6
function: Count
dependencies: 7