Question: Which has more people, Portland (the one that is located in Portland metropolitan area) or Northampton (the one whose postal code is 01060)?
Choices:
Greenville
Oakland
Boulder
Franklin
Waukegan
New Haven
Northampton
Lansing
Portland
Compton
Answer: Portland
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Portland" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Portland metropolitan area" . } UNION { ?e <pred:name> "Northampton" . ?e <postal_code> ?pv_1 . ?pv_1 <pred:value> "01060" . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Portland metropolitan area
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Portland
function: And
dependencies: 1
2
function: Find
inputs: Northampton
function: FilterStr
dependencies: 4
inputs: postal code
01060
function: SelectBetween
dependencies: 3
5
inputs: population
greater