Question: Which one has less area, Carroll County (bordering on Grafton County) or Ramsey County?
Choices:
Delaware County
Greene County
San Juan County
Lee County
Carroll County
Washoe County
Ramsey County
African Union
Cass County
Orange County
Program:
function: Find
inputs: Grafton County
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Carroll County
function: And
dependencies: 1
2
function: Find
inputs: Ramsey County
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Carroll County" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Grafton County" .   } UNION { ?e <pred:name> "Ramsey County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Ramsey County