Question: What is the number of metropolitan boroughs whose capital is Rotherham (with the OS grid reference SK4392) or GSS code is E08000036 as of 2011?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "metropolitan borough" .  { ?e <capital> ?e_1 . ?e_1 <pred:name> "Rotherham" . ?e_1 <OS_grid_reference> ?pv . ?pv <pred:value> "SK4392" .  } UNION { ?e <GSS_code_(2011)> ?pv . ?pv <pred:value> "E08000036" .  } }
Program:
function: Find
inputs: Rotherham
function: FilterStr
dependencies: 0
inputs: OS grid reference
SK4392
function: Relate
dependencies: 1
inputs: capital
backward
function: FilterConcept
dependencies: 2
inputs: metropolitan borough
function: FindAll
function: FilterStr
dependencies: 4
inputs: GSS code (2011)
E08000036
function: FilterConcept
dependencies: 5
inputs: metropolitan borough
function: Or
dependencies: 3
6
function: Count
dependencies: 7