Question: How many miniseries based on The Firm, penned by John Grisham, have a season count other than zero?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 0
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "miniseries" . ?e_1 <derivative_work> ?e . ?e_1 <pred:name> "The Firm" . ?e_1 <author> ?e_2 . ?e_2 <pred:name> "John Grisham" .  ?e <number_of_seasons> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "0"^^xsd:double ) .  }
Program:
function: Find
inputs: John Grisham
function: Relate
dependencies: 0
inputs: author
backward
function: Find
inputs: The Firm
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: derivative work
forward
function: FilterConcept
dependencies: 4
inputs: miniseries
function: FindAll
function: FilterNum
dependencies: 6
inputs: number of seasons
0
!=
function: FilterConcept
dependencies: 7
inputs: miniseries
function: And
dependencies: 5
8
function: Count
dependencies: 9