Question: Which area is smaller in size, Nelson (the one whose area is 445 square kilometre) or Santa Fe (the one whose population is 405683)?
Choices:
Trieste
Nelson
Chihuahua
Kilkenny
Dundee
Bergen
Cork
Abidjan
Santo Domingo
Santa Fe
Program:
function: Find
inputs: Nelson
function: FilterNum
dependencies: 0
inputs: area
445 square kilometre
=
function: Find
inputs: Santa Fe
function: FilterNum
dependencies: 2
inputs: population
405683
=
function: SelectBetween
dependencies: 1
3
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Nelson" . ?e <area> ?pv_1 . ?pv_1 <pred:unit> "square kilometre" . ?pv_1 <pred:value> "445"^^xsd:double . } UNION { ?e <pred:name> "Santa Fe" . ?e <population> ?pv_2 . ?pv_2 <pred:unit> "1" . ?pv_2 <pred:value> "405683"^^xsd:double . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Santa Fe