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