Question: Does Glendale, which borders Los Angeles, or Los Gatos have the higher elevation?
Choices:
New Haven
Franklin
Lansing
Glendale
Boulder
Los Gatos
Oakland
Columbus
Compton
Greenville
Program:
function: Find
inputs: Los Angeles
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Glendale
function: And
dependencies: 1
2
function: Find
inputs: Los Gatos
function: SelectBetween
dependencies: 3
4
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Glendale" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Los Angeles" .   } UNION { ?e <pred:name> "Los Gatos" .  } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Glendale