Question: Is there less elevation above sea level in Buenos Aires Province or Rio de Janeiro (the one that shares border with Minas Gerais)?
Choices:
Chiapas
Podlaskie Voivodeship
Upper Austria
England
New South Wales
Buenos Aires Province
Rio de Janeiro
Lublin Voivodeship
Greater Poland Voivodeship
Punjab
Program:
function: Find
inputs: Buenos Aires Province
function: Find
inputs: Minas Gerais
function: Relate
dependencies: 1
inputs: shares border with
backward
function: Find
inputs: Rio de Janeiro
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: elevation above sea level
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Buenos Aires Province" .  } UNION { ?e <pred:name> "Rio de Janeiro" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Minas Gerais" .   } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Buenos Aires Province