Question: Which show has fewer seasons, American Idol (the one that is created by Simon Fuller) or Monk?
Choices:
Saturday Night's Main Event
Robot Chicken
Monk
Seinfeld
American Idol
Dancing with the Stars
Phineas and Ferb
Game of Thrones
American Horror Story
Six Feet Under
Program:
function: Find
inputs: Simon Fuller
function: Relate
dependencies: 0
inputs: creator
backward
function: Find
inputs: American Idol
function: And
dependencies: 1
2
function: Find
inputs: Monk
function: SelectBetween
dependencies: 3
4
inputs: number of seasons
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "American Idol" . ?e <creator> ?e_1 . ?e_1 <pred:name> "Simon Fuller" .   } UNION { ?e <pred:name> "Monk" .  } ?e <number_of_seasons> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Monk