Question: Which movie is shorter, Hamlet (the one that was nominated for BAFTA Award for Best Film) or Dutch (the one that has Ed O'Neill as a cast member)?
Choices:
The Towering Inferno
Training Day
Curse of the Golden Flower
Rebecca
Talk to Her
Pleasantville
A Prairie Home Companion
Hamlet
Dutch
The Hunchback of Notre Dame
Program:
function: Find
inputs: BAFTA Award for Best Film
function: Relate
dependencies: 0
inputs: nominated for
backward
function: Find
inputs: Hamlet
function: And
dependencies: 1
2
function: Find
inputs: Ed O'Neill
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Dutch
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hamlet" . ?e <nominated_for> ?e_1 . ?e_1 <pred:name> "BAFTA Award for Best Film" .   } UNION { ?e <pred:name> "Dutch" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Ed O'Neill" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Dutch