Question: Does Sarajevo, twinned administrative body of Baku, or Wellington have the smaller population?
Choices:
Moscow
Manila
Wellington
Lausanne
Paris
New Delhi
Riga
Sarajevo
Doha
Mexico City
Program:
function: Find
inputs: Baku
function: Relate
dependencies: 0
inputs: twinned administrative body
backward
function: Find
inputs: Sarajevo
function: And
dependencies: 1
2
function: Find
inputs: Wellington
function: SelectBetween
dependencies: 3
4
inputs: population
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Sarajevo" . ?e <twinned_administrative_body> ?e_1 . ?e_1 <pred:name> "Baku" .   } UNION { ?e <pred:name> "Wellington" .  } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Sarajevo