Question: Which has less area, Derbyshire (that shares it's border with Nottinghamshire) or Berkshire?
Choices:
Warwickshire
East Riding of Yorkshire
Somerset
West Midlands
Norfolk
Essex
Northumberland
Berkshire
Staffordshire
Derbyshire
Program:
function: Find
inputs: Berkshire
function: Find
inputs: Nottinghamshire
function: Relate
dependencies: 1
inputs: shares border with
backward
function: Find
inputs: Derbyshire
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Berkshire" .  } UNION { ?e <pred:name> "Derbyshire" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Nottinghamshire" .   } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Berkshire