Question: Which one is shorter, Great Expectations (the one that has Peter Jacobson as a cast member) or Monster's Ball?
Choices:
The Fifth Element
Training Day
Rebecca
Great Expectations
A Prairie Home Companion
Talk to Her
Pleasantville
Monster's Ball
Curse of the Golden Flower
The Hunchback of Notre Dame
Program:
function: Find
inputs: Peter Jacobson
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Great Expectations
function: And
dependencies: 1
2
function: Find
inputs: Monster's Ball
function: SelectBetween
dependencies: 3
4
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Great Expectations" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Peter Jacobson" .   } UNION { ?e <pred:name> "Monster's Ball" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Great Expectations