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