Question: How many Pennsylvania counties border Lancaster County, which borders Cecil County, or are the setting of 127 Hours?
Choices:
2
3
4
5
6
7
8
9
10
11
Answer: 4
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Pennsylvania" .  { ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Lancaster County" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "Cecil County" .  } UNION { ?e_1 <narrative_location> ?e . ?e_1 <pred:name> "127 Hours" .  } }
Program:
function: Find
inputs: Cecil County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Lancaster County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: county of Pennsylvania
function: Find
inputs: 127 Hours
function: Relate
dependencies: 6
inputs: narrative location
forward
function: FilterConcept
dependencies: 7
inputs: county of Pennsylvania
function: Or
dependencies: 5
8
function: Count
dependencies: 9