Question: Which country has a greater GDP (PPP), Australia which shares a border with Indonesia, or Samoa?
Choices: Weimar Republic
Samoa
Cambodia
People's Republic of China
South Sudan
Kiribati
Benin
Socialist Federal Republic of Yugoslavia
Australia
Switzerland
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Samoa" .  } UNION { ?e <pred:name> "Australia" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Indonesia" .   } ?e <GDP_(PPP)> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Samoa
function: Find
inputs: Indonesia
function: Relate
dependencies: 1
inputs: shares border with
backward
function: Find
inputs: Australia
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: GDP (PPP)
greater
Answer: Australia