Question: Which movie is shorter, Shark Tale (the one whose production company is DreamWorks Animation) or Robin Hood (the one whose production company is The Walt Disney Company)?
Choices:
Aladdin
WALL·E
Shrek 2
Lilo & Stitch
The Rescuers
Renaissance
Shark Tale
Winnie the Pooh
Beauty and the Beast
Robin Hood
Program:
function: Find
inputs: DreamWorks Animation
function: Relate
dependencies: 0
inputs: production company
backward
function: Find
inputs: Shark Tale
function: And
dependencies: 1
2
function: Find
inputs: The Walt Disney Company
function: Relate
dependencies: 4
inputs: production company
backward
function: Find
inputs: Robin Hood
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Shark Tale" . ?e <production_company> ?e_1 . ?e_1 <pred:name> "DreamWorks Animation" .   } UNION { ?e <pred:name> "Robin Hood" . ?e <production_company> ?e_2 . ?e_2 <pred:name> "The Walt Disney Company" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Robin Hood