Question: Does New Brunswick (whose population is 754260) or Manitoba have the greater area?
Choices:
Quebec
British Columbia
Prince Edward Island
Nova Scotia
Manitoba
Newfoundland and Labrador
Saskatchewan
Alberta
New Brunswick
Ontario
Program:
function: Find
inputs: New Brunswick
function: FilterNum
dependencies: 0
inputs: population
754260
=
function: Find
inputs: Manitoba
function: SelectBetween
dependencies: 1
2
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "New Brunswick" . ?e <population> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "754260"^^xsd:double . } UNION { ?e <pred:name> "Manitoba" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Manitoba