Question: Is the smaller area occupied by Washington County that borders Baldwin County, or by Mobile County?
Choices:
Jefferson County
Shelby County
Montgomery County
Baldwin County
Jackson County
Washington County
Dallas County
Monroe County
Mobile County
Madison County
Program:
function: Find
inputs: Baldwin County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Washington County
function: And
dependencies: 1
2
function: Find
inputs: Mobile County
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Washington County" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Baldwin County" .   } UNION { ?e <pred:name> "Mobile County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Washington County