Question: Is the duration greater for The End of the Affair, which has Peter Cushing as a cast member, or Invictus?
Choices:
The Fifth Element
Talk to Her
Pleasantville
A Prairie Home Companion
Training Day
The End of the Affair
The Hunchback of Notre Dame
Invictus
The Towering Inferno
Curse of the Golden Flower
Program:
function: Find
inputs: Peter Cushing
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: The End of the Affair
function: And
dependencies: 1
2
function: Find
inputs: Invictus
function: SelectBetween
dependencies: 3
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The End of the Affair" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Peter Cushing" .   } UNION { ?e <pred:name> "Invictus" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Invictus