Question: Which one has higher unemployment rate, Cuba (the one that has a diplomatic relation with Russia) or Kazakhstan ?
Choices:
Bulgaria
Lithuania
Tajikistan
Kazakhstan
Luxembourg
Fiji
Finland
Sweden
Greece
Kosovo
Program:
function: Find
inputs: Russia
function: Relate
dependencies: 0
inputs: diplomatic relation
forward
function: Find
inputs: Cuba
function: And
dependencies: 1
2
function: Find
inputs: Kazakhstan
function: SelectBetween
dependencies: 3
4
inputs: unemployment rate
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Cuba" . ?e_1 <diplomatic_relation> ?e . ?e_1 <pred:name> "Russia" .   } UNION { ?e <pred:name> "Kazakhstan" .  } ?e <unemployment_rate> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Kazakhstan