Question: Which movie is shorter, Where the Wild Things Are (the one that has Spike Jonze as a cast member) or Troy (the one that has Brad Pitt as a cast member)?
Choices:
Pleasantville
Talk to Her
Where the Wild Things Are
Rebecca
Training Day
The Fifth Element
The Towering Inferno
Curse of the Golden Flower
Troy
The Hunchback of Notre Dame
Program:
function: Find
inputs: Spike Jonze
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Where the Wild Things Are
function: And
dependencies: 1
2
function: Find
inputs: Brad Pitt
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Troy
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Where the Wild Things Are" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Spike Jonze" .   } UNION { ?e <pred:name> "Troy" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Brad Pitt" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Where the Wild Things Are