Question: Which movie is shorter, Great Expectations (the one that has Peter Jacobson as a cast member) or Bedazzled (the one whose script is wrote by Harold Ramis)?
Choices:
The Fifth Element
A Prairie Home Companion
Bedazzled
Great Expectations
Curse of the Golden Flower
The Hunchback of Notre Dame
Rebecca
Training Day
Talk to Her
Pleasantville
Answer: Bedazzled
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Great Expectations" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Peter Jacobson" .   } UNION { ?e <pred:name> "Bedazzled" . ?e <screenwriter> ?e_2 . ?e_2 <pred:name> "Harold Ramis" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
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: Harold Ramis
function: Relate
dependencies: 4
inputs: screenwriter
backward
function: Find
inputs: Bedazzled
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less