Question: Which movie is longer, New York (the one whose production company is Yash Raj Films) or On Her Majesty's Secret Service (the one that has Telly Savalas as a cast member)?
Choices:
Curse of the Golden Flower
The Towering Inferno
Talk to Her
Rebecca
A Prairie Home Companion
New York
On Her Majesty's Secret Service
The Fifth Element
The Hunchback of Notre Dame
Pleasantville
Answer: New York
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "New York" . ?e <production_company> ?e_1 . ?e_1 <pred:name> "Yash Raj Films" .   } UNION { ?e <pred:name> "On Her Majesty's Secret Service" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Telly Savalas" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Yash Raj Films
function: Relate
dependencies: 0
inputs: production company
backward
function: Find
inputs: New York
function: And
dependencies: 1
2
function: Find
inputs: Telly Savalas
function: Relate
dependencies: 4
inputs: cast member
backward
function: Find
inputs: On Her Majesty's Secret Service
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater