Question: How many ceremonial counties of England there are that is headed by the Prime Minister of the United Kingdom or that is different from Devon (the one whose GSS code (2011) is E10000008)?
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> "ceremonial county of England" .  { ?e <office_held_by_head_of_government> ?e_1 . ?e_1 <pred:name> "Prime Minister of the United Kingdom" .  } UNION { ?e <different_from> ?e_1 . ?e_1 <pred:name> "Devon" . ?e_1 <GSS_code_(2011)> ?pv . ?pv <pred:value> "E10000008" .  } }
Program:
function: Find
inputs: Prime Minister of the United Kingdom
function: Relate
dependencies: 0
inputs: office held by head of government
backward
function: FilterConcept
dependencies: 1
inputs: ceremonial county of England
function: Find
inputs: Devon
function: FilterStr
dependencies: 3
inputs: GSS code (2011)
E10000008
function: Relate
dependencies: 4
inputs: different from
backward
function: FilterConcept
dependencies: 5
inputs: ceremonial county of England
function: Or
dependencies: 2
6
function: Count
dependencies: 7
Answer: 1