Question: Which movie is shorter, Enid (the one that has Helena Bonham Carter as a cast member) or The Quiet Man (the one that received Academy Award for Best Director)?
Choices:
A Streetcar Named Desire
The Three Musketeers
The Music Man
The Challenge
Enid
Shackleton
The Quiet Man
The Late Shift
All Quiet on the Western Front
A Christmas Carol
Program:
function: Find
inputs: Helena Bonham Carter
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Enid
function: And
dependencies: 1
2
function: Find
inputs: Academy Award for Best Director
function: Relate
dependencies: 4
inputs: award received
backward
function: Find
inputs: The Quiet Man
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Enid" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Helena Bonham Carter" .   } UNION { ?e <pred:name> "The Quiet Man" . ?e <award_received> ?e_2 . ?e_2 <pred:name> "Academy Award for Best Director" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Enid