Question: What Massachusetts county shares a border with Plymouth County (that shares a border with Barnstable County) and has the FIPS 6-4 (US counties) 25001?
Choices: Bristol County
Essex County
Suffolk County
Hampshire County
Berkshire County
Middlesex County
Barnstable County
Worcester County
Plymouth County
Norfolk County
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Massachusetts" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Plymouth County" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "Barnstable County" .  ?e <FIPS_6-4_(US_counties)> ?pv . ?pv <pred:value> "25001" .  }
Program:
function: Find
inputs: Barnstable County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Plymouth County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
backward
function: FilterConcept
dependencies: 4
inputs: county of Massachusetts
function: FindAll
function: FilterStr
dependencies: 6
inputs: FIPS 6-4 (US counties)
25001
function: FilterConcept
dependencies: 7
inputs: county of Massachusetts
function: And
dependencies: 5
8
function: What
dependencies: 9
Answer: Barnstable County