Question: Which has more seasons, Cagney & Lacey or Bad Teacher (the one whose narrative location is Los Angeles)?
Choices:
American Horror Story
Six Feet Under
Dancing with the Stars
Cagney & Lacey
Seinfeld
Bad Teacher
Phineas and Ferb
Saturday Night's Main Event
Robot Chicken
Game of Thrones
Answer: Cagney & Lacey
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Cagney & Lacey" .  } UNION { ?e <pred:name> "Bad Teacher" . ?e <narrative_location> ?e_1 . ?e_1 <pred:name> "Los Angeles" .   } ?e <number_of_seasons> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Cagney & Lacey
function: Find
inputs: Los Angeles
function: Relate
dependencies: 1
inputs: narrative location
backward
function: Find
inputs: Bad Teacher
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: number of seasons
greater