Question: Which movie is shorter, Shrek Forever After (the one whose production company is DreamWorks Animation) or Finding Nemo (the one that has Ellen DeGeneres as a voice actor)?
Choices: Beauty and the Beast
Shrek Forever After
Shrek 2
Aladdin
Peter Pan
Finding Nemo
Lilo & Stitch
The Rescuers
WALL·E
Winnie the Pooh
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Shrek Forever After" . ?e <production_company> ?e_1 . ?e_1 <pred:name> "DreamWorks Animation" .   } UNION { ?e <pred:name> "Finding Nemo" . ?e <voice_actor> ?e_2 . ?e_2 <pred:name> "Ellen DeGeneres" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: DreamWorks Animation
function: Relate
dependencies: 0
inputs: production company
backward
function: Find
inputs: Shrek Forever After
function: And
dependencies: 1
2
function: Find
inputs: Ellen DeGeneres
function: Relate
dependencies: 4
inputs: voice actor
backward
function: Find
inputs: Finding Nemo
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
Answer: Shrek Forever After