Question: How many Maine counties contain the administrative division Augusta (which is the capital of Kennebec County) or are an administrative division of Maine?
Choices:
1
2
3
4
5
6
7
8
9
10
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> "Augusta" . ?e_2 <capital> ?e_1 . ?e_2 <pred:name> "Kennebec County" .  } UNION { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Maine" .  } }
Program:
function: Find
inputs: Kennebec County
function: Relate
dependencies: 0
inputs: capital
forward
function: Find
inputs: Augusta
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: contains administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: county of Maine
function: Find
inputs: Maine
function: Relate
dependencies: 6
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 7
inputs: county of Maine
function: Or
dependencies: 5
8
function: Count
dependencies: 9