Question: How many dynasties were established before 1371 or are located in Djibouti with 675,891 inhabitants ?
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> "dynasty" .  { ?e <location> ?e_1 . ?e_1 <pred:name> "Djibouti" . ?e_1 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "675891"^^xsd:double .  } UNION { ?e <inception> ?pv . ?pv <pred:year> ?v . FILTER ( ?v < 1371 ) .  } }
Program:
function: Find
inputs: Djibouti
function: FilterNum
dependencies: 0
inputs: population
675891
=
function: Relate
dependencies: 1
inputs: location
backward
function: FilterConcept
dependencies: 2
inputs: dynasty
function: FindAll
function: FilterYear
dependencies: 4
inputs: inception
1371
<
function: FilterConcept
dependencies: 5
inputs: dynasty
function: Or
dependencies: 3
6
function: Count
dependencies: 7