Question: Tell me the non Metropolitan District that is Norfolk administrative division, which shares a border with Lincolnshire, and that has a TOID of 7000000000007016.
Choices:
King's Lynn and West Norfolk
Kettering
West Dorset
Craven
North Norfolk
Guildford
Chichester
Great Yarmouth
Carlisle
South Somerset
Answer: King's Lynn and West Norfolk
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "non-metropolitan district" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Norfolk" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "Lincolnshire" .  ?e <TOID> ?pv . ?pv <pred:value> "7000000000007016" .  }
Program:
function: Find
inputs: Lincolnshire
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Norfolk
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: non-metropolitan district
function: FindAll
function: FilterStr
dependencies: 6
inputs: TOID
7000000000007016
function: FilterConcept
dependencies: 7
inputs: non-metropolitan district
function: And
dependencies: 5
8
function: What
dependencies: 9