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