Question: Which movie is shorter, Bobby (the one whose composer is Laxmikant-Pyarelal) or Mr. & Mrs. Smith (the one that has Robert Montgomery as a cast member)?
Choices:
The Fifth Element
Talk to Her
Curse of the Golden Flower
Bobby
The Hunchback of Notre Dame
Mr. & Mrs. Smith
Pleasantville
Training Day
The Towering Inferno
Rebecca
Program:
function: Find
inputs: Laxmikant-Pyarelal
function: Relate
dependencies: 0
inputs: composer
backward
function: Find
inputs: Bobby
function: And
dependencies: 1
2
function: Find
inputs: Robert Montgomery
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: Mr. & Mrs. Smith
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Bobby" . ?e <composer> ?e_1 . ?e_1 <pred:name> "Laxmikant-Pyarelal" .   } UNION { ?e <pred:name> "Mr. & Mrs. Smith" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Robert Montgomery" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Mr. & Mrs. Smith