Question: Which has higher elevation above sea level, Leipzig or Nuremberg (the one that shares border with Erlangen)?
Choices:
Bergen
Leipzig
Santo Domingo
Nuremberg
Kingston
Abidjan
Cork
Kilkenny
Trieste
Chihuahua
Program:
function: Find
inputs: Leipzig
function: Find
inputs: Erlangen
function: Relate
dependencies: 1
inputs: shares border with
forward
function: Find
inputs: Nuremberg
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Leipzig" .  } UNION { ?e <pred:name> "Nuremberg" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Erlangen" .   } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Nuremberg