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