Question: Which movie is longer, High Fidelity (the one that has Joan Cusack as a cast member) or The Specialist (the one whose genre is documentary film)?
Choices:
The Specialist
A Prairie Home Companion
Talk to Her
The Towering Inferno
Training Day
The Hunchback of Notre Dame
Rebecca
The Fifth Element
Pleasantville
High Fidelity
Answer: The Specialist
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "High Fidelity" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Joan Cusack" .   } UNION { ?e <pred:name> "The Specialist" . ?e <genre> ?e_2 . ?e_2 <pred:name> "documentary film" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Joan Cusack
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: High Fidelity
function: And
dependencies: 1
2
function: Find
inputs: documentary film
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: The Specialist
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater