Question: How many animated films were published before 2009 or have trains as their central topic?
Choices:
30
31
32
33
34
35
36
37
38
39
Answer: 33
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "animated film" .  { ?e <publication_date> ?pv . ?pv <pred:year> ?v . FILTER ( ?v < 2009 ) .  } UNION { ?e <main_subject> ?e_1 . ?e_1 <pred:name> "train" .  } }
Program:
function: FindAll
function: FilterYear
dependencies: 0
inputs: publication date
2009
<
function: FilterConcept
dependencies: 1
inputs: animated film
function: Find
inputs: train
function: Relate
dependencies: 3
inputs: main subject
backward
function: FilterConcept
dependencies: 4
inputs: animated film
function: Or
dependencies: 2
5
function: Count
dependencies: 6