Question: Does Alaska (that is the lowest point of the Pacific Ocean) or Illinois (that shares a boundary with Missouri) have the lower elevation above sea level?
Choices:
Illinois
Massachusetts
Hawaii
New Mexico
Alaska
California
Iowa
Kansas
New Jersey
Colorado
Program:
function: Find
inputs: Pacific Ocean
function: Relate
dependencies: 0
inputs: lowest point
backward
function: Find
inputs: Alaska
function: And
dependencies: 1
2
function: Find
inputs: Missouri
function: Relate
dependencies: 4
inputs: shares border with
backward
function: Find
inputs: Illinois
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: elevation above sea level
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Alaska" . ?e <lowest_point> ?e_1 . ?e_1 <pred:name> "Pacific Ocean" .   } UNION { ?e <pred:name> "Illinois" . ?e <shares_border_with> ?e_2 . ?e_2 <pred:name> "Missouri" .  } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Illinois