Question: What television series is based on Anger Management (the one that has Adam Sandler as a cast member), and has a number of episodes not equal to 5800?
Choices:
Seinfeld
Saturday Night's Main Event
Hallmark Hall of Fame
Underbelly
Anger Management
Robot Chicken
Six Feet Under
American Horror Story
Dancing with the Stars
Bleak House
Answer: Anger Management
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "television series" . ?e <based_on> ?e_1 . ?e_1 <pred:name> "Anger Management" . ?e_1 <cast_member> ?e_2 . ?e_2 <pred:name> "Adam Sandler" .  ?e <number_of_episodes> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "5800"^^xsd:double ) .  }
Program:
function: Find
inputs: Adam Sandler
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Anger Management
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: based on
backward
function: FilterConcept
dependencies: 4
inputs: television series
function: FindAll
function: FilterNum
dependencies: 6
inputs: number of episodes
5800
!=
function: FilterConcept
dependencies: 7
inputs: television series
function: And
dependencies: 5
8
function: What
dependencies: 9