Question: Which area is larger, Nottinghamshire or Essex (the one that shares border with Greater London)?
Choices:
Northumberland
Warwickshire
East Riding of Yorkshire
Somerset
Norfolk
Derbyshire
Nottinghamshire
Essex
Cumbria
Staffordshire
Program:
function: Find
inputs: Nottinghamshire
function: Find
inputs: Greater London
function: Relate
dependencies: 1
inputs: shares border with
forward
function: Find
inputs: Essex
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Nottinghamshire" .  } UNION { ?e <pred:name> "Essex" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Greater London" .   } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Essex