Question: How many military branches do we know that belong to someone's allegiance, while the person in question is the head of Bahamas ((the one whose nominal GDP is 2,472,500,000 USD) ?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "military branch" . ?e <allegiance> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "human" . ?e_2 <head_of_state> ?e_1 . ?e_2 <pred:name> "Bahamas" . ?e_2 <nominal_GDP> ?pv . ?pv <pred:unit> "United States dollar" . ?pv <pred:value> "2472500000"^^xsd:double .   }
Program:
function: Find
inputs: Bahamas
function: FilterNum
dependencies: 0
inputs: nominal GDP
2472500000 United States dollar
=
function: Relate
dependencies: 1
inputs: head of state
forward
function: FilterConcept
dependencies: 2
inputs: human
function: Relate
dependencies: 3
inputs: allegiance
backward
function: FilterConcept
dependencies: 4
inputs: military branch
function: Count
dependencies: 5