Question: Which movie is longer, Nine Lives (the one that has Glenn Close as a cast member) or Where the Wild Things Are (the one that has James Gandolfini as a voice actor)?
Choices:
Pleasantville
Nine Lives
The Towering Inferno
The Hunchback of Notre Dame
Rebecca
Talk to Her
A Prairie Home Companion
Where the Wild Things Are
The Fifth Element
Training Day
Program:
function: Find
inputs: Glenn Close
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Nine Lives
function: And
dependencies: 1
2
function: Find
inputs: James Gandolfini
function: Relate
dependencies: 4
inputs: voice actor
backward
function: Find
inputs: Where the Wild Things Are
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Nine Lives" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Glenn Close" .   } UNION { ?e <pred:name> "Where the Wild Things Are" . ?e <voice_actor> ?e_2 . ?e_2 <pred:name> "James Gandolfini" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Nine Lives