Question: Which movie is shorter, The Man Who Wasn't There (the one that has Jon Polito as a cast member) or Miracle on 34th Street (the one that has Allison Janney as a cast member)?
Choices:
Miracle on 34th Street
The Fifth Element
Training Day
Rebecca
The Hunchback of Notre Dame
Talk to Her
Curse of the Golden Flower
The Man Who Wasn't There
A Prairie Home Companion
Pleasantville
Program:
function: Find
inputs: Jon Polito
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: The Man Who Wasn't There
function: And
dependencies: 1
2
function: Find
inputs: Allison Janney
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Miracle on 34th Street
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Man Who Wasn't There" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Jon Polito" .   } UNION { ?e <pred:name> "Miracle on 34th Street" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Allison Janney" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Miracle on 34th Street