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