Question: Which has more population, Newcastle upon Tyne that is an administrative division of Tyne and Wear or Stockport that is an administrative division of Greater Manchester?
Choices:
Stockport
Walsall
Bury
Bradford
Birmingham
Solihull
Newcastle upon Tyne
Wakefield
Sheffield
Leeds
Answer: Newcastle upon Tyne
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Newcastle upon Tyne" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Tyne and Wear" .   } UNION { ?e <pred:name> "Stockport" . ?e_2 <contains_administrative_territorial_entity> ?e . ?e_2 <pred:name> "Greater Manchester" .  } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Tyne and Wear
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
forward
function: Find
inputs: Newcastle upon Tyne
function: And
dependencies: 1
2
function: Find
inputs: Greater Manchester
function: Relate
dependencies: 4
inputs: contains administrative territorial entity
forward
function: Find
inputs: Stockport
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: population
greater