Question: How many television programs are there whose number of seasons is not 0 or whose ending date is not in 2007?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "television program" .  { ?e <number_of_seasons> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "0"^^xsd:double ) .  } UNION { ?e <end_time> ?pv . ?pv <pred:year> ?v . FILTER ( ?v != 2007 ) .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: number of seasons
0
!=
function: FilterConcept
dependencies: 1
inputs: television program
function: FindAll
function: FilterYear
dependencies: 3
inputs: end time
2007
!=
function: FilterConcept
dependencies: 4
inputs: television program
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 5