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