Question: Does Somerville whose local dialing code is 617 or Joliet have the higher elevation?
Choices:
Oakland
Greenville
Somerville
Franklin
Joliet
Columbus
Lansing
Boulder
Compton
New Haven
Program:
function: Find
inputs: Somerville
function: FilterStr
dependencies: 0
inputs: local dialing code
617
function: Find
inputs: Joliet
function: SelectBetween
dependencies: 1
2
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Somerville" . ?e <local_dialing_code> ?pv_1 . ?pv_1 <pred:value> "617" . } UNION { ?e <pred:name> "Joliet" . } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Joliet