Question: What is the number of metropolitan boroughs having the capital city that is situated in Wakefield (whose GSS code is E08000036 as of 2011)?
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> "metropolitan borough" . ?e_1 <capital_of> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "city" . ?e_1 <located_in_the_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Wakefield" . ?e_2 <GSS_code_(2011)> ?pv_1 . ?pv_1 <pred:value> "E08000036" .   }
Program:
function: Find
inputs: Wakefield
function: FilterStr
dependencies: 0
inputs: GSS code (2011)
E08000036
function: Relate
dependencies: 1
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 2
inputs: city
function: Relate
dependencies: 3
inputs: capital of
forward
function: FilterConcept
dependencies: 4
inputs: metropolitan borough
function: Count
dependencies: 5