Question: How many democracies form the basin country of a river whose basin country is Germany ?
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> "democracy" . ?e_1 <basin_country> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "river" . ?e_1 <basin_country> ?e_2 . ?e_2 <pred:name> "Germany" .   }
Program:
function: Find
inputs: Germany
function: Relate
dependencies: 0
inputs: basin country
backward
function: FilterConcept
dependencies: 1
inputs: river
function: Relate
dependencies: 2
inputs: basin country
forward
function: FilterConcept
dependencies: 3
inputs: democracy
function: Count
dependencies: 4