Question: Which has fewer people, Tianjin or Gibraltar (the one that claims the territory of United Kingdom)?
Choices:
İzmir
Alexandria
Basra
Fremantle
Busan
Barcelona
Tianjin
Cleopatra
Odessa
Gibraltar
Program:
function: Find
inputs: Tianjin
function: Find
inputs: United Kingdom
function: Relate
dependencies: 1
inputs: territory claimed by
backward
function: Find
inputs: Gibraltar
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: population
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Tianjin" .  } UNION { ?e <pred:name> "Gibraltar" . ?e <territory_claimed_by> ?e_1 . ?e_1 <pred:name> "United Kingdom" .   } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Gibraltar