Question: How many ethnic groups whose population is not 770000 or that is a facet of Mozambique?
Choices:
9
10
11
12
13
14
15
16
17
18
Answer: 11
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "ethnic group" .  { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "770000"^^xsd:double ) .  } UNION { ?e <facet_of> ?e_1 . ?e_1 <pred:name> "Mozambique" .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: population
770000
!=
function: FilterConcept
dependencies: 1
inputs: ethnic group
function: Find
inputs: Mozambique
function: Relate
dependencies: 3
inputs: facet of
backward
function: FilterConcept
dependencies: 4
inputs: ethnic group
function: Or
dependencies: 2
5
function: Count
dependencies: 6