Question: Which show has fewer episodes, Prison Break (the one whose original language is Spanish) or Training Day (the one whose genre is police procedural)?
Choices:
Saturday Night's Main Event
Seinfeld
Phineas and Ferb
American Horror Story
Six Feet Under
Training Day
Prison Break
Dancing with the Stars
Robot Chicken
Bleak House
Program:
function: Find
inputs: Spanish
function: Relate
dependencies: 0
inputs: original language of film or TV show
backward
function: Find
inputs: Prison Break
function: And
dependencies: 1
2
function: Find
inputs: police procedural
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: Training Day
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: number of episodes
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Prison Break" . ?e <original_language_of_film_or_TV_show> ?e_1 . ?e_1 <pred:name> "Spanish" .   } UNION { ?e <pred:name> "Training Day" . ?e <genre> ?e_2 . ?e_2 <pred:name> "police procedural" .  } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Training Day