Question: How many metropolitan boroughs contain Rochdale (the one whose TOID is 4000000074566708) or have the United Kingdom as a country?
Choices: 14
15
16
17
18
19
20
21
22
23
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "metropolitan borough" .  { ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Rochdale" . ?e_1 <TOID> ?pv . ?pv <pred:value> "4000000074566708" .  } UNION { ?e <country> ?e_1 . ?e_1 <pred:name> "United Kingdom" .  } }
Program:
function: Find
inputs: Rochdale
function: FilterStr
dependencies: 0
inputs: TOID
4000000074566708
function: Relate
dependencies: 1
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 2
inputs: metropolitan borough
function: Find
inputs: United Kingdom
function: Relate
dependencies: 4
inputs: country
backward
function: FilterConcept
dependencies: 5
inputs: metropolitan borough
function: Or
dependencies: 3
6
function: Count
dependencies: 7
Answer: 16