Question: Which area is smaller, Messina or Windsor (the one whose postal code is N8W)?
Choices:
Bergen
Dundee
Chihuahua
Trieste
Kilkenny
Windsor
Messina
Abidjan
Santo Domingo
Cork
Program:
function: Find
inputs: Messina
function: Find
inputs: Windsor
function: FilterStr
dependencies: 1
inputs: postal code
N8W
function: SelectBetween
dependencies: 0
2
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Messina" . } UNION { ?e <pred:name> "Windsor" . ?e <postal_code> ?pv_1 . ?pv_1 <pred:value> "N8W" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Windsor