Question: How many administrative territorial entities are the capital of Pakistan or have a postal code of 9031?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "administrative territorial entity" .  { ?e_1 <capital> ?e . ?e_1 <pred:name> "Pakistan" .  } UNION { ?e <postal_code> ?pv . ?pv <pred:value> "9031" .  } }
Program:
function: Find
inputs: Pakistan
function: Relate
dependencies: 0
inputs: capital
forward
function: FilterConcept
dependencies: 1
inputs: administrative territorial entity
function: FindAll
function: FilterStr
dependencies: 3
inputs: postal code
9031
function: FilterConcept
dependencies: 4
inputs: administrative territorial entity
function: Or
dependencies: 2
5
function: Count
dependencies: 6