Question: Which area has more people, Liverpool (the one whose ISO 3166-2 code is GB-LIV) or St Helens (the one whose GSS code (2011) is E08000013)?
Choices:
St Helens
Wakefield
Bury
Birmingham
Liverpool
Rochdale
Leeds
Sheffield
Walsall
Solihull
Program:
function: Find
inputs: Liverpool
function: FilterStr
dependencies: 0
inputs: ISO 3166-2 code
GB-LIV
function: Find
inputs: St Helens
function: FilterStr
dependencies: 2
inputs: GSS code (2011)
E08000013
function: SelectBetween
dependencies: 1
3
inputs: population
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Liverpool" . ?e <ISO_3166-2_code> ?pv_1 . ?pv_1 <pred:value> "GB-LIV" . } UNION { ?e <pred:name> "St Helens" . ?e <GSS_code_(2011)> ?pv_2 . ?pv_2 <pred:value> "E08000013" . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Liverpool