Question: Does the Mercer County bordering Bucks County or Monmouth County occupy the smaller space, of the two?
Choices:
Gloucester County
Hunterdon County
Morris County
Bergen County
Monmouth County
Hudson County
Passaic County
Essex County
Mercer County
Burlington County
Program:
function: Find
inputs: Bucks County
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Mercer County
function: And
dependencies: 1
2
function: Find
inputs: Monmouth County
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Mercer County" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Bucks County" .   } UNION { ?e <pred:name> "Monmouth County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Mercer County