Question: Is the population size larger in Dover, belonging to the UK, or Grimsby in Lincolnshire?
Choices:
Macclesfield
Wigan
Blackburn
South Shields
Wimbledon
Doncaster
Colchester
Royal Tunbridge Wells
Grimsby
Edmonton
Program:
function: Find
inputs: United Kingdom
function: Relate
dependencies: 0
inputs: country
backward
function: Find
inputs: Dover
function: And
dependencies: 1
2
function: Find
inputs: Lincolnshire
function: Relate
dependencies: 4
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Grimsby
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: population
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Dover" . ?e <country> ?e_1 . ?e_1 <pred:name> "United Kingdom" .   } UNION { ?e <pred:name> "Grimsby" . ?e <located_in_the_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Lincolnshire" .  } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Grimsby