Question: How many democracies are located on a continent of the geographic region where Eswatini can be also found ?
Choices:
15
16
17
18
19
20
21
22
23
24
Answer: 19
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "democracy" . ?e <continent> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "geographic region" . ?e_3 <continent> ?e_1 . ?e_3 <pred:name> "Eswatini" .   }
Program:
function: Find
inputs: Eswatini
function: Relate
dependencies: 0
inputs: continent
forward
function: FilterConcept
dependencies: 1
inputs: geographic region
function: Relate
dependencies: 2
inputs: continent
backward
function: FilterConcept
dependencies: 3
inputs: democracy
function: Count
dependencies: 4