Question: What has a larger population, Dumfermline or Richmond, which has a postal code of TW9?
Choices:
Dunfermline
Macclesfield
Edmonton
Blackburn
Colchester
Wimbledon
Richmond
Doncaster
Wigan
Royal Tunbridge Wells
Answer: Dunfermline
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Richmond" . ?e <postal_code> ?pv_1 . ?pv_1 <pred:value> "TW9" . } UNION { ?e <pred:name> "Dunfermline" . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Richmond
function: FilterStr
dependencies: 0
inputs: postal code
TW9
function: Find
inputs: Dunfermline
function: SelectBetween
dependencies: 1
2
inputs: population
greater