Question: Which has smaller area, Montgomery County that borders Chester County or Jefferson County that borders Armstrong County?
Choices:
Westmoreland County
Bucks County
Cumberland County
Jefferson County
Warren County
York County
Fayette County
Franklin County
Allegheny County
Montgomery County
Answer: Montgomery County
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Montgomery County" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Chester County" .   } UNION { ?e <pred:name> "Jefferson County" . ?e <shares_border_with> ?e_2 . ?e_2 <pred:name> "Armstrong County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Chester County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Montgomery County
function: And
dependencies: 1
2
function: Find
inputs: Armstrong County
function: Relate
dependencies: 4
inputs: shares border with
backward
function: Find
inputs: Jefferson County
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: area
less