Question: Which movie is shorter, Julia (the one that mainly depicts alcoholism) or Legend (the one whose genre is biographical film)?
Choices:
The Fifth Element
A Prairie Home Companion
Julia
Rebecca
Training Day
The Hunchback of Notre Dame
Talk to Her
Legend
Pleasantville
Curse of the Golden Flower
Program:
function: Find
inputs: alcoholism
function: Relate
dependencies: 0
inputs: main subject
backward
function: Find
inputs: Julia
function: And
dependencies: 1
2
function: Find
inputs: biographical film
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: Legend
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Julia" . ?e <main_subject> ?e_1 . ?e_1 <pred:name> "alcoholism" .   } UNION { ?e <pred:name> "Legend" . ?e <genre> ?e_2 . ?e_2 <pred:name> "biographical film" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Legend