Question: Which area is smaller, Nelson (the one whose FIPS 10-4 (countries and regions) is NZF5) or Belgrade?
Choices:
Kingston
Bergen
Nelson
Trieste
Kilkenny
Belgrade
Chihuahua
Santo Domingo
Abidjan
Cork
Program:
function: Find
inputs: Nelson
function: FilterStr
dependencies: 0
inputs: FIPS 10-4 (countries and regions)
NZF5
function: Find
inputs: Belgrade
function: SelectBetween
dependencies: 1
2
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Nelson" . ?e <FIPS_10-4_(countries_and_regions)> ?pv_1 . ?pv_1 <pred:value> "NZF5" . } UNION { ?e <pred:name> "Belgrade" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Belgrade