Question: Which one covers a smaller area, North Yorkshire (the one that shares border with Cumbria) or Shropshire
Choices:
Cumbria
Somerset
Essex
Shropshire
Norfolk
Derbyshire
Northumberland
West Midlands
North Yorkshire
Warwickshire
Program:
function: Find
inputs: Cumbria
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: North Yorkshire
function: And
dependencies: 1
2
function: Find
inputs: Shropshire
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "North Yorkshire" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Cumbria" .   } UNION { ?e <pred:name> "Shropshire" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Shropshire