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