Question: How many ceremonial counties of England have the FIPS 10-4 (countries and regions) of UKJ7 or share a border with Derbyshire (the one that shares border with West Yorkshire)?
Choices: 1
2
3
4
5
6
7
8
9
10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "ceremonial county of England" .  { ?e <FIPS_10-4_(countries_and_regions)> ?pv . ?pv <pred:value> "UKJ7" .  } UNION { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Derbyshire" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "West Yorkshire" .  } }
Program:
function: FindAll
function: FilterStr
dependencies: 0
inputs: FIPS 10-4 (countries and regions)
UKJ7
function: FilterConcept
dependencies: 1
inputs: ceremonial county of England
function: Find
inputs: West Yorkshire
function: Relate
dependencies: 3
inputs: shares border with
forward
function: Find
inputs: Derbyshire
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: shares border with
backward
function: FilterConcept
dependencies: 7
inputs: ceremonial county of England
function: Or
dependencies: 2
8
function: Count
dependencies: 9
Answer: 8