Question: Does Somerset County (that shares a border with Cambria County) or Lackawanna County have less area?
Choices:
Fayette County
Warren County
Bucks County
Allegheny County
Lehigh County
Westmoreland County
York County
Cumberland County
Franklin County
Lackawanna County
Program:
function: Find
inputs: Cambria County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Somerset County
function: And
dependencies: 1
2
function: Find
inputs: Lackawanna County
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Somerset County" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Cambria County" .   } UNION { ?e <pred:name> "Lackawanna County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Lackawanna County