Question: Which movie is shorter, Batman (the one whose production company is 20th Century Fox) or Trainspotting (the one that has Jonny Lee Miller as a cast member)?
Choices:
Rebecca
The Towering Inferno
The Fifth Element
Talk to Her
Batman
Pleasantville
Trainspotting
A Prairie Home Companion
The Hunchback of Notre Dame
Curse of the Golden Flower
Answer: Trainspotting
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Batman" . ?e <production_company> ?e_1 . ?e_1 <pred:name> "20th Century Fox" .   } UNION { ?e <pred:name> "Trainspotting" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Jonny Lee Miller" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: 20th Century Fox
function: Relate
dependencies: 0
inputs: production company
backward
function: Find
inputs: Batman
function: And
dependencies: 1
2
function: Find
inputs: Jonny Lee Miller
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Trainspotting
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less