Question: Which one of two locations—Oldham (in Greater Manchester) or Sheffield (with an ISO 3166-2 code of GB-SHF)—has the smaller measured area?
Choices:
Stockport
Bury
Rochdale
Newcastle upon Tyne
Solihull
Oldham
Walsall
Birmingham
Leeds
Sheffield
Program:
function: Find
inputs: Sheffield
function: FilterStr
dependencies: 0
inputs: ISO 3166-2 code
GB-SHF
function: Find
inputs: Greater Manchester
function: Relate
dependencies: 2
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Oldham
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Sheffield" . ?e <ISO_3166-2_code> ?pv_1 . ?pv_1 <pred:value> "GB-SHF" . } UNION { ?e <pred:name> "Oldham" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Greater Manchester" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Oldham