Question: Which one has less elevation above sea level between Worcester (the one that is the origin of the name Worcester County) or Somerville (the one whose area is 10.936893 square kilometers)?
Choices:
Waukegan
Lansing
Somerville
Worcester
Compton
Boulder
Franklin
Columbus
Oakland
Greenville
Answer: Somerville
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Worcester" . ?e_1 <named_after> ?e . ?e_1 <pred:name> "Worcester County" . } UNION { ?e <pred:name> "Somerville" . ?e <area> ?pv_1 . ?pv_1 <pred:unit> "square kilometre" . ?pv_1 <pred:value> "10.936893"^^xsd:double . } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Worcester County
function: Relate
dependencies: 0
inputs: named after
forward
function: Find
inputs: Worcester
function: And
dependencies: 1
2
function: Find
inputs: Somerville
function: FilterNum
dependencies: 4
inputs: area
10.936893 square kilometre
=
function: SelectBetween
dependencies: 3
5
inputs: elevation above sea level
less