Question: Does Hamilton (the one whose country is United Kingdom) or Aldershot have a bigger population?
Choices:
Royal Tunbridge Wells
Wigan
Blackburn
Edmonton
South Shields
Macclesfield
Doncaster
Wimbledon
Colchester
Aldershot
Program:
function: Find
inputs: United Kingdom
function: Relate
dependencies: 0
inputs: country
backward
function: Find
inputs: Hamilton
function: And
dependencies: 1
2
function: Find
inputs: Aldershot
function: SelectBetween
dependencies: 3
4
inputs: population
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hamilton" . ?e <country> ?e_1 . ?e_1 <pred:name> "United Kingdom" .   } UNION { ?e <pred:name> "Aldershot" .  } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Aldershot