Question: Tell me the one with a smaller duration, The Happening (which has a script wrote by M. Night Shyamalan) or Funny People.
Choices:
Talk to Her
Pleasantville
Funny People
A Prairie Home Companion
The Hunchback of Notre Dame
Curse of the Golden Flower
Rebecca
The Fifth Element
The Happening
Training Day
Program:
function: Find
inputs: M. Night Shyamalan
function: Relate
dependencies: 0
inputs: screenwriter
backward
function: Find
inputs: The Happening
function: And
dependencies: 1
2
function: Find
inputs: Funny People
function: SelectBetween
dependencies: 3
4
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Happening" . ?e <screenwriter> ?e_1 . ?e_1 <pred:name> "M. Night Shyamalan" .   } UNION { ?e <pred:name> "Funny People" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: The Happening