Question: Which has higher elevation above sea level, Bedford (the one that is located in Westchester County) or Brookline?
Choices:
Greenwich
Amherst
Kensington
Litchfield
Chapel Hill
West Hartford
Bedford
Morristown
Uxbridge
Brookline
Program:
function: Find
inputs: Westchester County
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Bedford
function: And
dependencies: 1
2
function: Find
inputs: Brookline
function: SelectBetween
dependencies: 3
4
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Bedford" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Westchester County" .   } UNION { ?e <pred:name> "Brookline" .  } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Bedford