Question: Which movie is longer, Vanity Fair (the one whose genre is costume drama) or The Birdcage?
Choices:
Curse of the Golden Flower
A Prairie Home Companion
Vanity Fair
Training Day
The Fifth Element
Rebecca
The Birdcage
Talk to Her
Pleasantville
The Hunchback of Notre Dame
Program:
function: Find
inputs: costume drama
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: Vanity Fair
function: And
dependencies: 1
2
function: Find
inputs: The Birdcage
function: SelectBetween
dependencies: 3
4
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Vanity Fair" . ?e <genre> ?e_1 . ?e_1 <pred:name> "costume drama" .   } UNION { ?e <pred:name> "The Birdcage" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: The Birdcage