Question: How many Alabama counties are located in the state of the United States that shares the Alabama–Mississippi border with Mississippi (that partially contains the Mississippi River)?
Choices:
5
6
7
8
9
10
11
12
13
14
Answer: 10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Alabama" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "state of the United States" . ?e_3 <shares_border_with> ?e_1 . ?e_3 <pred:name> "Mississippi" . ?e_3 <partially_contains> ?e_4 . ?e_4 <pred:name> "Mississippi River" . [ <pred:fact_h> ?e_3 ; <pred:fact_r> <shares_border_with> ; <pred:fact_t> ?e_1 ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Alabama–Mississippi border" .   }
Program:
function: Find
inputs: Mississippi River
function: Relate
dependencies: 0
inputs: partially contains
backward
function: Find
inputs: Mississippi
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: QFilterStr
dependencies: 4
inputs: statement is subject of
Alabama–Mississippi border
function: FilterConcept
dependencies: 5
inputs: state of the United States
function: Relate
dependencies: 6
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 7
inputs: county of Alabama
function: Count
dependencies: 8