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