Question: Which has greater total reserves, Bangladesh (which has a diplomatic relation with Kazakhstan) or Senegal?
Choices:
Cambodia
South Sudan
Bangladesh
Kiribati
Benin
Weimar Republic
Socialist Federal Republic of Yugoslavia
Samoa
Switzerland
Senegal
Answer: Bangladesh
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Senegal" .  } UNION { ?e <pred:name> "Bangladesh" . ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "Kazakhstan" .   } ?e <total_reserves> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Senegal
function: Find
inputs: Kazakhstan
function: Relate
dependencies: 1
inputs: diplomatic relation
backward
function: Find
inputs: Bangladesh
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: total reserves
greater