Question: How many Illinois counties are located in Illinois (the one that shares a border with Michigan)?
Choices:
15
16
17
18
19
20
21
22
23
24
Answer: 18
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Illinois" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Illinois" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Michigan" .   }
Program:
function: Find
inputs: Michigan
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Illinois
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: county of Illinois
function: Count
dependencies: 5