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