Question: How many provinces of China contain Amsterdam (whose WOEID is 727232) or have the ISO 3166-2 code CN-33?
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> "province of China" .  { ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Amsterdam" . ?e_1 <WOEID> ?pv . ?pv <pred:value> "727232" .  } UNION { ?e <ISO_3166-2_code> ?pv . ?pv <pred:value> "CN-33" .  } }
Program:
function: Find
inputs: Amsterdam
function: FilterStr
dependencies: 0
inputs: WOEID
727232
function: Relate
dependencies: 1
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 2
inputs: province of China
function: FindAll
function: FilterStr
dependencies: 4
inputs: ISO 3166-2 code
CN-33
function: FilterConcept
dependencies: 5
inputs: province of China
function: Or
dependencies: 3
6
function: Count
dependencies: 7
Answer: 1