Question: Which has lower elevation above sea level, Waterloo which is headed by councillor or Saskatoon?
Choices:
Dundee
Waterloo
Kilkenny
Chihuahua
Trieste
Kingston
Cork
Bergen
Santo Domingo
Saskatoon
Program:
function: Find
inputs: councillor
function: Relate
dependencies: 0
inputs: office held by head of government
backward
function: Find
inputs: Waterloo
function: And
dependencies: 1
2
function: Find
inputs: Saskatoon
function: SelectBetween
dependencies: 3
4
inputs: elevation above sea level
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Waterloo" . ?e <office_held_by_head_of_government> ?e_1 . ?e_1 <pred:name> "councillor" .   } UNION { ?e <pred:name> "Saskatoon" .  } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Waterloo