Question: Which movie is shorter, Heroes (the one that is shot in Los Angeles) or Planet of the Apes (the one that has Roddy McDowall as a cast member)?
Choices:
American Horror Story
Phineas and Ferb
Heroes
Robot Chicken
Planet of the Apes
Dancing with the Stars
Saturday Night's Main Event
Six Feet Under
Seinfeld
Game of Thrones
Program:
function: Find
inputs: Los Angeles
function: Relate
dependencies: 0
inputs: filming location
backward
function: Find
inputs: Heroes
function: And
dependencies: 1
2
function: Find
inputs: Roddy McDowall
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Planet of the Apes
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Heroes" . ?e <filming_location> ?e_1 . ?e_1 <pred:name> "Los Angeles" .   } UNION { ?e <pred:name> "Planet of the Apes" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Roddy McDowall" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Heroes