Question: Which movie is shorter, Anastasia (the one whose genre is drama film) or The Firm (the one that is shot in Cayman Islands)?
Choices:
The Hunchback of Notre Dame
Curse of the Golden Flower
Anastasia
The Towering Inferno
The Firm
A Prairie Home Companion
Rebecca
Training Day
Talk to Her
The Fifth Element
Answer: Anastasia
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Anastasia" . ?e <genre> ?e_1 . ?e_1 <pred:name> "drama film" .   } UNION { ?e <pred:name> "The Firm" . ?e <filming_location> ?e_2 . ?e_2 <pred:name> "Cayman Islands" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: drama film
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: Anastasia
function: And
dependencies: 1
2
function: Find
inputs: Cayman Islands
function: Relate
dependencies: 4
inputs: filming location
backward
function: Find
inputs: The Firm
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less