Question: Which one, Santiago de Cuba or Valencia (the one whose country is Spain), has less elevation (above sea level)?
Choices:
Cork
Chihuahua
Kilkenny
Dundee
Santiago de Cuba
Valencia
Bergen
Santo Domingo
Abidjan
Kingston
Program:
function: Find
inputs: Santiago de Cuba
function: Find
inputs: Spain
function: Relate
dependencies: 1
inputs: country
backward
function: Find
inputs: Valencia
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: elevation above sea level
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Santiago de Cuba" .  } UNION { ?e <pred:name> "Valencia" . ?e <country> ?e_1 . ?e_1 <pred:name> "Spain" .   } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Valencia