Question: Does Newcastle upon Tyne (the administrative division of Tyne and Wear) or Bury (located in Greater Manchester) have greater population ?
Choices:
Wakefield
Bradford
Birmingham
Stockport
Walsall
Newcastle upon Tyne
Bury
Rochdale
Leeds
Solihull
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> "Bury" . ?e <located_in_the_administrative_territorial_entity> ?e_2 . ?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: located in the administrative territorial entity
backward
function: Find
inputs: Bury
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: population
greater