Question: What number of sovereign states have a life expectancy other than 11.1 years or are the country from which Mars Attacks! originates?
Choices:
119
120
121
122
123
124
125
126
127
128
Answer: 125
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "sovereign state" .  { ?e_1 <country_of_origin> ?e . ?e_1 <pred:name> "Mars Attacks!" .  } UNION { ?e <life_expectancy> ?pv . ?pv <pred:unit> "year" . ?pv <pred:value> ?v . FILTER ( ?v != "11.1"^^xsd:double ) .  } }
Program:
function: Find
inputs: Mars Attacks!
function: Relate
dependencies: 0
inputs: country of origin
forward
function: FilterConcept
dependencies: 1
inputs: sovereign state
function: FindAll
function: FilterNum
dependencies: 3
inputs: life expectancy
11.1 year
!=
function: FilterConcept
dependencies: 4
inputs: sovereign state
function: Or
dependencies: 2
5
function: Count
dependencies: 6