Question: How many Michigan counties border the Michigan county that borders St. Clair County which contains Port Huron?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Michigan" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "county of Michigan" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "St. Clair County" . ?e_3 <located_in_the_administrative_territorial_entity> ?e_2 . ?e_3 <pred:name> "Port Huron" .   }
Program:
function: Find
inputs: Port Huron
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
forward
function: Find
inputs: St. Clair County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: county of Michigan
function: Relate
dependencies: 5
inputs: shares border with
backward
function: FilterConcept
dependencies: 6
inputs: county of Michigan
function: Count
dependencies: 7
Answer: 3