Question: Which has more area, Somerset County that borders Cambria County or Armstrong County?
Choices:
Cumberland County
Franklin County
Lehigh County
Westmoreland County
Bucks County
Warren County
York County
Somerset County
Armstrong County
Fayette County
Program:
function: Find
inputs: Cambria County
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Somerset County
function: And
dependencies: 1
2
function: Find
inputs: Armstrong County
function: SelectBetween
dependencies: 3
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Somerset County" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Cambria County" .   } UNION { ?e <pred:name> "Armstrong County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Somerset County