Question: What human settlement bordering Orange, which borders East Orange, has the fewest inhabitants?
Choices: Verona
Belleville
Wexford
Montclair
Whanganui
Ridgewood
Red Bank
West Orange
Livingston
Princeton
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "human settlement" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Orange" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "East Orange" .  ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: East Orange
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Orange
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: human settlement
function: SelectAmong
dependencies: 5
inputs: population
smallest
Answer: Montclair