Question: Is the area less for Ridgewood or Orange (the one that shares border with West Orange)?
Choices:
Livingston
Ridgewood
West Orange
Whanganui
Orange
Verona
Belleville
North Hollywood
Montclair
Red Bank
Program:
function: Find
inputs: Ridgewood
function: Find
inputs: West Orange
function: Relate
dependencies: 1
inputs: shares border with
forward
function: Find
inputs: Orange
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Ridgewood" .  } UNION { ?e <pred:name> "Orange" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "West Orange" .   } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Orange