Question: Which has a greater population, Wakefield (which is an administrative division of West Yorkshire) or Newcastle upon Tyne (whose population is 292900)?
Choices:
Newcastle upon Tyne
Leeds
Walsall
Birmingham
Sheffield
Rochdale
Bradford
Wakefield
Bury
Solihull
Answer: Wakefield
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Wakefield" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "West Yorkshire" . } UNION { ?e <pred:name> "Newcastle upon Tyne" . ?e <population> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "292900"^^xsd:double . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: West Yorkshire
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
forward
function: Find
inputs: Wakefield
function: And
dependencies: 1
2
function: Find
inputs: Newcastle upon Tyne
function: FilterNum
dependencies: 4
inputs: population
292900
=
function: SelectBetween
dependencies: 3
5
inputs: population
greater