Question: What is the number of non-metropolitan counties whose ISO 3166-2 code is GB-HAM or that is different from Gloucestershire (the one that shares border with Warwickshire) ?
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> "non-metropolitan county" .  { ?e <ISO_3166-2_code> ?pv . ?pv <pred:value> "GB-HAM" .  } UNION { ?e <different_from> ?e_1 . ?e_1 <pred:name> "Gloucestershire" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "Warwickshire" .  } }
Program:
function: FindAll
function: FilterStr
dependencies: 0
inputs: ISO 3166-2 code
GB-HAM
function: FilterConcept
dependencies: 1
inputs: non-metropolitan county
function: Find
inputs: Warwickshire
function: Relate
dependencies: 3
inputs: shares border with
backward
function: Find
inputs: Gloucestershire
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: different from
backward
function: FilterConcept
dependencies: 7
inputs: non-metropolitan county
function: Or
dependencies: 2
8
function: Count
dependencies: 9
Answer: 2