Question: What Pennsylvania county shares a border with Chautauqua County and with Cattaraugus County?
Choices:
Allegheny County
Lehigh County
Fayette County
Warren County
Westmoreland County
Cumberland County
Erie County
Bucks County
York County
Franklin County
Program:
function: Find
inputs: Chautauqua County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: county of Pennsylvania
function: Find
inputs: Cattaraugus County
function: Relate
dependencies: 3
inputs: shares border with
backward
function: FilterConcept
dependencies: 4
inputs: county of Pennsylvania
function: And
dependencies: 2
5
function: What
dependencies: 6
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Pennsylvania" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Chautauqua County" .  ?e <shares_border_with> ?e_2 . ?e_2 <pred:name> "Cattaraugus County" .  }
Answer: Warren County