Question: Which area is smaller, Delaware County (the one that shares border with Gloucester County) or Northampton County (the one that contains Easton)?
Choices:
Warren County
Fayette County
Bucks County
Northampton County
York County
Cumberland County
Allegheny County
Franklin County
Westmoreland County
Delaware County
Program:
function: Find
inputs: Gloucester County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Delaware County
function: And
dependencies: 1
2
function: Find
inputs: Easton
function: Relate
dependencies: 4
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Northampton County
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Delaware County" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Gloucester County" .   } UNION { ?e <pred:name> "Northampton County" . ?e_2 <located_in_the_administrative_territorial_entity> ?e . ?e_2 <pred:name> "Easton" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Delaware County