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