Question: Which one has less population between Gloucester (the one whose elevation above sea level is 15 metre) and Portsmouth (the one whose postal code is 03801)?
Choices:
Greenville
Franklin
Boulder
Portsmouth
Waukegan
Compton
Lansing
Gloucester
New Haven
Oakland
Answer: Portsmouth
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Gloucester" . ?e <elevation_above_sea_level> ?pv_1 . ?pv_1 <pred:unit> "metre" . ?pv_1 <pred:value> "15"^^xsd:double . } UNION { ?e <pred:name> "Portsmouth" . ?e <postal_code> ?pv_2 . ?pv_2 <pred:value> "03801" . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Gloucester
function: FilterNum
dependencies: 0
inputs: elevation above sea level
15 metre
=
function: Find
inputs: Portsmouth
function: FilterStr
dependencies: 2
inputs: postal code
03801
function: SelectBetween
dependencies: 1
3
inputs: population
less