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