Question: Does Gloucestershire that shares border with Warwickshire or County Durham have less area?
Choices:
County Durham
Somerset
Norfolk
Gloucestershire
Derbyshire
Northumberland
Cumbria
Warwickshire
West Midlands
Staffordshire
Program:
function: Find
inputs: Warwickshire
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Gloucestershire
function: And
dependencies: 1
2
function: Find
inputs: County Durham
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Gloucestershire" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Warwickshire" .   } UNION { ?e <pred:name> "County Durham" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: County Durham