Question: Which one has a smaller population, Orange (which has a border with East Orange) or Belleville (the one having the postal code 07109)?
Choices:
North Hollywood
West Orange
Orange
Ridgewood
Montclair
Princeton
Livingston
Belleville
Verona
Whanganui
Answer: Orange
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Orange" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "East Orange" . } UNION { ?e <pred:name> "Belleville" . ?e <postal_code> ?pv_1 . ?pv_1 <pred:value> "07109" . } ?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
backward
function: Find
inputs: Orange
function: And
dependencies: 1
2
function: Find
inputs: Belleville
function: FilterStr
dependencies: 4
inputs: postal code
07109
function: SelectBetween
dependencies: 3
5
inputs: population
less