Question: Which has higher elevation above sea level, Concord (the one that shares border with Walnut Creek) or Beaumont?
Choices:
Beaumont
Concord
New Haven
Waukegan
Columbus
Lansing
Franklin
Boulder
Oakland
Greenville
Program:
function: Find
inputs: Walnut Creek
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Concord
function: And
dependencies: 1
2
function: Find
inputs: Beaumont
function: SelectBetween
dependencies: 3
4
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Concord" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Walnut Creek" .   } UNION { ?e <pred:name> "Beaumont" .  } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Concord