Question: Which movie is longer, Richard III (the one that has Ralph Richardson as a cast member) or It's a Wonderful Life (the one whose production company is Republic Pictures)?
Choices:
Pleasantville
Curse of the Golden Flower
Rebecca
The Towering Inferno
Richard III
The Hunchback of Notre Dame
The Fifth Element
Training Day
It's a Wonderful Life
A Prairie Home Companion
Answer: Richard III
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Richard III" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Ralph Richardson" .   } UNION { ?e <pred:name> "It's a Wonderful Life" . ?e <production_company> ?e_2 . ?e_2 <pred:name> "Republic Pictures" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Ralph Richardson
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Richard III
function: And
dependencies: 1
2
function: Find
inputs: Republic Pictures
function: Relate
dependencies: 4
inputs: production company
backward
function: Find
inputs: It's a Wonderful Life
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater