Question: Which non-metropolitan district that, is an administrative division of Surrey, (the one that shares border with West Sussex) has the largest area?
Choices:
King's Lynn and West Norfolk
Guildford
West Dorset
North Norfolk
Carlisle
South Somerset
Woking
Great Yarmouth
Kettering
Chichester
Program:
function: Find
inputs: West Sussex
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Surrey
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: non-metropolitan district
function: SelectAmong
dependencies: 5
inputs: area
largest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "non-metropolitan district" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Surrey" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "West Sussex" .  ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Guildford