Question: How many rivers are located in or next to Richmond whose postal code is TW9?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "river" . ?e_1 <located_in_or_next_to_body_of_water> ?e . ?e_1 <pred:name> "Richmond" . ?e_1 <postal_code> ?pv . ?pv <pred:value> "TW9" .   }
Program:
function: Find
inputs: Richmond
function: FilterStr
dependencies: 0
inputs: postal code
TW9
function: Relate
dependencies: 1
inputs: located in or next to body of water
forward
function: FilterConcept
dependencies: 2
inputs: river
function: Count
dependencies: 3