Question: Which movie is shorter, Psycho (the one whose distributor is Paramount Pictures) or Fantastic Four: Rise of the Silver Surfer (the one whose genre is action film)?
Choices:
Pleasantville
A Prairie Home Companion
Talk to Her
The Hunchback of Notre Dame
Psycho
Training Day
Fantastic Four: Rise of the Silver Surfer
Rebecca
Curse of the Golden Flower
The Fifth Element
Program:
function: Find
inputs: Paramount Pictures
function: Relate
dependencies: 0
inputs: distributor
backward
function: Find
inputs: Psycho
function: And
dependencies: 1
2
function: Find
inputs: action film
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: Fantastic Four: Rise of the Silver Surfer
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Psycho" . ?e <distributor> ?e_1 . ?e_1 <pred:name> "Paramount Pictures" .   } UNION { ?e <pred:name> "Fantastic Four: Rise of the Silver Surfer" . ?e <genre> ?e_2 . ?e_2 <pred:name> "action film" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Fantastic Four: Rise of the Silver Surfer