Question: Does Anchorage or Alexandria (that shares a border with Baton Rouge) have the higher elevation above sea level?
Choices:
Waukegan
New Haven
Columbus
Greenville
Alexandria
Lansing
Franklin
Compton
Oakland
Anchorage
Program:
function: Find
inputs: Anchorage
function: Find
inputs: Baton Rouge
function: Relate
dependencies: 1
inputs: shares border with
backward
function: Find
inputs: Alexandria
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Anchorage" .  } UNION { ?e <pred:name> "Alexandria" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Baton Rouge" .   } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Anchorage