Question: Which show has fewer episodes, Bewitched (the one whose genre is fantasy) or Ryan's Hope?
Choices:
Bewitched
Robot Chicken
Ryan's Hope
Dancing with the Stars
Bleak House
American Horror Story
Six Feet Under
Saturday Night's Main Event
Phineas and Ferb
Game of Thrones
Program:
function: Find
inputs: fantasy
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: Bewitched
function: And
dependencies: 1
2
function: Find
inputs: Ryan's Hope
function: SelectBetween
dependencies: 3
4
inputs: number of episodes
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Bewitched" . ?e <genre> ?e_1 . ?e_1 <pred:name> "fantasy" .   } UNION { ?e <pred:name> "Ryan's Hope" .  } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Bewitched