Question: What county of Maine has Bangor (the one that is located in Penobscot County) as the capital and contains Bangor (dialing code 207) administrative division ?
Choices:
Franklin County
Hancock County
Somerset County
Washington County
Aroostook County
Kennebec County
Oxford County
Cumberland County
York County
Penobscot County
Answer: Penobscot County
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Maine" . ?e_1 <capital_of> ?e . ?e_1 <pred:name> "Bangor" . ?e_1 <located_in_the_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Penobscot County" .  ?e <contains_administrative_territorial_entity> ?e_3 . ?e_3 <pred:name> "Bangor" . ?e_3 <local_dialing_code> ?pv . ?pv <pred:value> "207" .  }
Program:
function: Find
inputs: Penobscot County
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Bangor
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: capital of
forward
function: FilterConcept
dependencies: 4
inputs: county of Maine
function: Find
inputs: Bangor
function: FilterStr
dependencies: 6
inputs: local dialing code
207
function: Relate
dependencies: 7
inputs: contains administrative territorial entity
backward
function: FilterConcept
dependencies: 8
inputs: county of Maine
function: And
dependencies: 5
9
function: What
dependencies: 10