Question: Which area is larger, Algiers (the one that is the capital of Algeria) or Jeddah?
Choices:
Abidjan
Chihuahua
Cork
Bergen
Kilkenny
Santo Domingo
Dundee
Jeddah
Algiers
Kingston
Program:
function: Find
inputs: Algeria
function: Relate
dependencies: 0
inputs: capital of
backward
function: Find
inputs: Algiers
function: And
dependencies: 1
2
function: Find
inputs: Jeddah
function: SelectBetween
dependencies: 3
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Algiers" . ?e <capital_of> ?e_1 . ?e_1 <pred:name> "Algeria" .   } UNION { ?e <pred:name> "Jeddah" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Jeddah