Question: Which show has more seasons, Battlestar Galactica (the one that is a notable work of Ronald D. Moore) or Angel (the one that has Joel David Moore as a cast member)?
Choices:
Robot Chicken
Dancing with the Stars
Six Feet Under
American Horror Story
Battlestar Galactica
Angel
Seinfeld
Bleak House
Phineas and Ferb
Game of Thrones
Program:
function: Find
inputs: Ronald D. Moore
function: Relate
dependencies: 0
inputs: notable work
forward
function: Find
inputs: Battlestar Galactica
function: And
dependencies: 1
2
function: Find
inputs: Joel David Moore
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Angel
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: number of seasons
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Battlestar Galactica" . ?e_1 <notable_work> ?e . ?e_1 <pred:name> "Ronald D. Moore" .   } UNION { ?e <pred:name> "Angel" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Joel David Moore" .  } ?e <number_of_seasons> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Angel