Question: Which has more people, Paisley or Oldham (the one that is the headquarter location of Oldham Athletic A.F.C.)?
Choices:
Colchester
Oldham
Paisley
Doncaster
Wimbledon
Royal Tunbridge Wells
Wigan
Edmonton
Macclesfield
Blackburn
Program:
function: Find
inputs: Paisley
function: Find
inputs: Oldham Athletic A.F.C.
function: Relate
dependencies: 1
inputs: headquarters location
forward
function: Find
inputs: Oldham
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: population
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Paisley" .  } UNION { ?e <pred:name> "Oldham" . ?e_1 <headquarters_location> ?e . ?e_1 <pred:name> "Oldham Athletic A.F.C." .   } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Oldham