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