Question: Which show had more episodes The Little Mermaid (the one whose genre is television comedy) or St. Elsewhere?
Choices:
Saturday Night's Main Event
Game of Thrones
Seinfeld
Bleak House
American Horror Story
Six Feet Under
St. Elsewhere
Robot Chicken
Dancing with the Stars
Phineas and Ferb
Program:
function: Find
inputs: television comedy
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: The Little Mermaid
function: And
dependencies: 1
2
function: Find
inputs: St. Elsewhere
function: SelectBetween
dependencies: 3
4
inputs: number of episodes
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Little Mermaid" . ?e <genre> ?e_1 . ?e_1 <pred:name> "television comedy" .   } UNION { ?e <pred:name> "St. Elsewhere" .  } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: St. Elsewhere