Question: Which one has more episodes, Battlestar Galactica (the one that has Jane Seymour as a cast member) or Search for Tomorrow ?
Choices:
Saturday Night's Main Event
Phineas and Ferb
American Horror Story
Battlestar Galactica
Six Feet Under
Bleak House
Search for Tomorrow
Dancing with the Stars
Game of Thrones
Robot Chicken
Program:
function: Find
inputs: Jane Seymour
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Battlestar Galactica
function: And
dependencies: 1
2
function: Find
inputs: Search for Tomorrow
function: SelectBetween
dependencies: 3
4
inputs: number of episodes
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Battlestar Galactica" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Jane Seymour" .   } UNION { ?e <pred:name> "Search for Tomorrow" .  } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Search for Tomorrow