Question: Tell me the non-metropolitan district has Carlisle as the capital (the one with the OS grid reference of NY395555)
Choices: Norwich
Cumbria
South Somerset
Guildford
Craven
North Norfolk
Kettering
Winchester
Chichester
Carlisle
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "non-metropolitan district" . ?e_1 <capital_of> ?e . ?e_1 <pred:name> "Carlisle" . ?e_1 <OS_grid_reference> ?pv . ?pv <pred:value> "NY395555" .   }
Program:
function: Find
inputs: Carlisle
function: FilterStr
dependencies: 0
inputs: OS grid reference
NY395555
function: Relate
dependencies: 1
inputs: capital of
forward
function: FilterConcept
dependencies: 2
inputs: non-metropolitan district
function: What
dependencies: 3
Answer: Carlisle