Question: Which is at a lower elevation above sea level, Bedford which has a postal code of 10506, or Morristown?
Choices:
Bedford
Greenwich
Westport
Chapel Hill
Litchfield
Amherst
Kensington
Morristown
Brookline
Uxbridge
Program:
function: Find
inputs: Morristown
function: Find
inputs: Bedford
function: FilterStr
dependencies: 1
inputs: postal code
10506
function: SelectBetween
dependencies: 0
2
inputs: elevation above sea level
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Morristown" . } UNION { ?e <pred:name> "Bedford" . ?e <postal_code> ?pv_1 . ?pv_1 <pred:value> "10506" . } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Morristown