Question: Which movie is shorter, Angel (the one that has Sam Neill as a cast member) or A Christmas Carol (the one that has David Warner as a cast member)?
Choices:
Angel
Shackleton
All Quiet on the Western Front
The Music Man
The Goodbye Girl
Luther
The Three Musketeers
The Late Shift
A Streetcar Named Desire
A Christmas Carol
Program:
function: Find
inputs: Sam Neill
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Angel
function: And
dependencies: 1
2
function: Find
inputs: David Warner
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: A Christmas Carol
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Angel" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Sam Neill" .   } UNION { ?e <pred:name> "A Christmas Carol" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "David Warner" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: A Christmas Carol