Question: What is the number of democracies which are a part of the administrative territorial entity that use Hungarian as the official language ?
Choices:
2
3
4
5
6
7
8
9
10
11
Answer: 6
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "democracy" . ?e_1 <has_part> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "administrative territorial entity" . ?e_1 <official_language> ?e_2 . ?e_2 <pred:name> "Hungarian" .   }
Program:
function: Find
inputs: Hungarian
function: Relate
dependencies: 0
inputs: official language
backward
function: FilterConcept
dependencies: 1
inputs: administrative territorial entity
function: Relate
dependencies: 2
inputs: has part
forward
function: FilterConcept
dependencies: 3
inputs: democracy
function: Count
dependencies: 4