Question: Which movie is shorter, Edge of Darkness (the one that has Ray Winstone as a cast member) or Kansas City (the one that has Joshua Redman as a cast member)?
Choices:
Curse of the Golden Flower
Pleasantville
Edge of Darkness
Training Day
The Towering Inferno
Kansas City
A Prairie Home Companion
The Hunchback of Notre Dame
The Fifth Element
Talk to Her
Program:
function: Find
inputs: Ray Winstone
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Edge of Darkness
function: And
dependencies: 1
2
function: Find
inputs: Joshua Redman
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Kansas City
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Edge of Darkness" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Ray Winstone" .   } UNION { ?e <pred:name> "Kansas City" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Joshua Redman" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Kansas City