Question: Which show has more seasons, It (the one that has Seth Green as a cast member) or Grey's Anatomy?
Choices:
Saturday Night's Main Event
Game of Thrones
Phineas and Ferb
Bleak House
It
Grey's Anatomy
Robot Chicken
Seinfeld
Six Feet Under
American Horror Story
Program:
function: Find
inputs: Seth Green
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: It
function: And
dependencies: 1
2
function: Find
inputs: Grey's Anatomy
function: SelectBetween
dependencies: 3
4
inputs: number of seasons
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "It" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Seth Green" .   } UNION { ?e <pred:name> "Grey's Anatomy" .  } ?e <number_of_seasons> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Grey's Anatomy