Question: How many television series episodes are a part of Star Trek: The Next Generation (that is created by Gene Roddenberry) or have the production code 69421?
Choices:
6
7
8
9
10
11
12
13
14
15
Answer: 7
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "television series episode" .  { ?e <part_of_the_series> ?e_1 . ?e_1 <pred:name> "Star Trek: The Next Generation" . ?e_1 <creator> ?e_2 . ?e_2 <pred:name> "Gene Roddenberry" .  } UNION { ?e <production_code> ?pv . ?pv <pred:value> "69421" .  } }
Program:
function: Find
inputs: Gene Roddenberry
function: Relate
dependencies: 0
inputs: creator
backward
function: Find
inputs: Star Trek: The Next Generation
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: part of the series
backward
function: FilterConcept
dependencies: 4
inputs: television series episode
function: FindAll
function: FilterStr
dependencies: 6
inputs: production code
69421
function: FilterConcept
dependencies: 7
inputs: television series episode
function: Or
dependencies: 5
8
function: Count
dependencies: 9