Question: How many non-metro counties contain South Cambridgeshire administrative division (it is bordering Lincolnshole) and are the administrative division of Cambridgeshire (bordering Lincolnshire) ?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "non-metropolitan county" . ?e <contains_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "South Cambridgeshire" .  ?e_2 <contains_administrative_territorial_entity> ?e . ?e_2 <pred:name> "Cambridgeshire" . ?e_3 <shares_border_with> ?e_2 . ?e_3 <pred:name> "Lincolnshire" .  }
Program:
function: Find
inputs: South Cambridgeshire
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
backward
function: FilterConcept
dependencies: 1
inputs: non-metropolitan county
function: Find
inputs: Lincolnshire
function: Relate
dependencies: 3
inputs: shares border with
forward
function: Find
inputs: Cambridgeshire
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 7
inputs: non-metropolitan county
function: And
dependencies: 2
8
function: Count
dependencies: 9