Question: Which is shorter, Hamlet (with Ian Holm) or Providence (with John Gielgud)?
Choices:
Pleasantville
The Towering Inferno
Talk to Her
Providence
The Hunchback of Notre Dame
Rebecca
Curse of the Golden Flower
Hamlet
Training Day
The Fifth Element
Program:
function: Find
inputs: Ian Holm
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Hamlet
function: And
dependencies: 1
2
function: Find
inputs: John Gielgud
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Providence
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hamlet" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Ian Holm" .   } UNION { ?e <pred:name> "Providence" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "John Gielgud" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Providence