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