Question: Does Idaho, bordering British Columbia, or New York, population 19795791, have the lower elevation?
Choices:
Hawaii
New Mexico
Idaho
Illinois
New Jersey
New York
Florida
Massachusetts
Colorado
Iowa
Program:
function: Find
inputs: British Columbia
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Idaho
function: And
dependencies: 1
2
function: Find
inputs: New York
function: FilterNum
dependencies: 4
inputs: population
19795791
=
function: SelectBetween
dependencies: 3
5
inputs: elevation above sea level
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Idaho" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "British Columbia" . } UNION { ?e <pred:name> "New York" . ?e <population> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "19795791"^^xsd:double . } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: New York