Question: Which has more people, Preston (the one that is the capital of Lancashire) or Montevideo?
Choices:
Montevideo
Bergen
Kilkenny
Cork
Trieste
Dundee
Abidjan
Santo Domingo
Chihuahua
Preston
Program:
function: Find
inputs: Lancashire
function: Relate
dependencies: 0
inputs: capital
forward
function: Find
inputs: Preston
function: And
dependencies: 1
2
function: Find
inputs: Montevideo
function: SelectBetween
dependencies: 3
4
inputs: population
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Preston" . ?e_1 <capital> ?e . ?e_1 <pred:name> "Lancashire" .   } UNION { ?e <pred:name> "Montevideo" .  } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Montevideo