Question: Which movie is longer, Red Dragon (the one that has Ralph Fiennes as a cast member) or Blues Brothers 2000 (the one whose producer is Dan Aykroyd)?
Choices:
The Fifth Element
Training Day
A Prairie Home Companion
Red Dragon
Rebecca
Talk to Her
Pleasantville
Curse of the Golden Flower
The Hunchback of Notre Dame
The Towering Inferno
Program:
function: Find
inputs: Ralph Fiennes
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Red Dragon
function: And
dependencies: 1
2
function: Find
inputs: Dan Aykroyd
function: Relate
dependencies: 4
inputs: producer
backward
function: Find
inputs: Blues Brothers 2000
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Red Dragon" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Ralph Fiennes" .   } UNION { ?e <pred:name> "Blues Brothers 2000" . ?e <producer> ?e_2 . ?e_2 <pred:name> "Dan Aykroyd" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Red Dragon