Question: Which movie is longer, Hamlet (the one that has Jean Simmons as a cast member) or Flashdance?
Choices:
Hamlet
A Prairie Home Companion
Flashdance
Training Day
Curse of the Golden Flower
The Fifth Element
Rebecca
Talk to Her
Pleasantville
The Towering Inferno
Answer: Hamlet
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hamlet" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Jean Simmons" .   } UNION { ?e <pred:name> "Flashdance" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Jean Simmons
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Hamlet
function: And
dependencies: 1
2
function: Find
inputs: Flashdance
function: SelectBetween
dependencies: 3
4
inputs: duration
greater