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