Question: How many republics do we know that either have a diplomatic relation with Germany or report a different value than 11.4 years as their life expectancy ?
Choices: 31
32
33
34
35
36
37
38
39
40
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "republic" .  { ?e_1 <diplomatic_relation> ?e . ?e_1 <pred:name> "Germany" .  } UNION { ?e <life_expectancy> ?pv . ?pv <pred:unit> "year" . ?pv <pred:value> ?v . FILTER ( ?v != "11.4"^^xsd:double ) .  } }
Program:
function: Find
inputs: Germany
function: Relate
dependencies: 0
inputs: diplomatic relation
forward
function: FilterConcept
dependencies: 1
inputs: republic
function: FindAll
function: FilterNum
dependencies: 3
inputs: life expectancy
11.4 year
!=
function: FilterConcept
dependencies: 4
inputs: republic
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 34