Question: Which has more people, Tempe or Somerville whose elevation above sea level is 4 metres?
Choices:
Waukegan
Franklin
Greenville
Tempe
Lansing
Columbus
New Haven
Oakland
Boulder
Compton
Answer: Tempe
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Tempe" . } UNION { ?e <pred:name> "Somerville" . ?e <elevation_above_sea_level> ?pv_1 . ?pv_1 <pred:unit> "metre" . ?pv_1 <pred:value> "4"^^xsd:double . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Tempe
function: Find
inputs: Somerville
function: FilterNum
dependencies: 1
inputs: elevation above sea level
4 metre
=
function: SelectBetween
dependencies: 0
2
inputs: population
greater