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