Question: What number of Maine counties are admin divisions of Maine or have the admin division of Portland (which is 19 meters above sea level)?
Choices:
9
10
11
12
13
14
15
16
17
18
Answer: 10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Maine" .  { ?e <contains_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Portland" . ?e_1 <elevation_above_sea_level> ?pv . ?pv <pred:unit> "metre" . ?pv <pred:value> "19"^^xsd:double .  } UNION { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Maine" .  } }
Program:
function: Find
inputs: Portland
function: FilterNum
dependencies: 0
inputs: elevation above sea level
19 metre
=
function: Relate
dependencies: 1
inputs: contains administrative territorial entity
backward
function: FilterConcept
dependencies: 2
inputs: county of Maine
function: Find
inputs: Maine
function: Relate
dependencies: 4
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 5
inputs: county of Maine
function: Or
dependencies: 3
6
function: Count
dependencies: 7