Question: Which among the human settlements that share a border with Orange (the one whose area is 5.7 square kilometre) has the smallest population?
Choices:
Wexford
Livingston
Verona
Belleville
North Hollywood
Montclair
Princeton
West Orange
Red Bank
Whanganui
Program:
function: Find
inputs: Orange
function: FilterNum
dependencies: 0
inputs: area
5.7 square kilometre
=
function: Relate
dependencies: 1
inputs: shares border with
forward
function: FilterConcept
dependencies: 2
inputs: human settlement
function: SelectAmong
dependencies: 3
inputs: population
smallest
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_1 <area> ?pv_1 . ?pv_1 <pred:unit> "square kilometre" . ?pv_1 <pred:value> "5.7"^^xsd:double . ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Montclair