Question: Which country has a higher nominal GDP per capita, Indonesia or India, which has a diplomatic relationship with Japan?
Choices: Mozambique
India
Zimbabwe
Germany
Indonesia
Namibia
Tunisia
Italy
Sierra Leone
Bolivia
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Indonesia" .  } UNION { ?e <pred:name> "India" . ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "Japan" .   } ?e <nominal_GDP_per_capita> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Indonesia
function: Find
inputs: Japan
function: Relate
dependencies: 1
inputs: diplomatic relation
backward
function: Find
inputs: India
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: nominal GDP per capita
greater
Answer: Indonesia