Question: Which movie is shorter, Thomas Jefferson (the one whose genre is documentary film) or The Cardinal (the one whose producer is Otto Preminger)?
Choices:
Training Day
The Cardinal
The Hunchback of Notre Dame
Curse of the Golden Flower
A Prairie Home Companion
The Towering Inferno
Thomas Jefferson
Rebecca
Pleasantville
The Fifth Element
Program:
function: Find
inputs: documentary film
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: Thomas Jefferson
function: And
dependencies: 1
2
function: Find
inputs: Otto Preminger
function: Relate
dependencies: 4
inputs: producer
backward
function: Find
inputs: The Cardinal
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Thomas Jefferson" . ?e <genre> ?e_1 . ?e_1 <pred:name> "documentary film" .   } UNION { ?e <pred:name> "The Cardinal" . ?e <producer> ?e_2 . ?e_2 <pred:name> "Otto Preminger" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: The Cardinal