Question: Which movie is longer, Metropolis (the one whose production company is TriStar Pictures) or Madagascar 3: Europe's Most Wanted?
Choices:
Aladdin
Metropolis
Winnie the Pooh
Lilo & Stitch
Madagascar 3: Europe's Most Wanted
The Rescuers
Shrek 2
WALL·E
Peter Pan
Beauty and the Beast
Program:
function: Find
inputs: TriStar Pictures
function: Relate
dependencies: 0
inputs: production company
backward
function: Find
inputs: Metropolis
function: And
dependencies: 1
2
function: Find
inputs: Madagascar 3: Europe's Most Wanted
function: SelectBetween
dependencies: 3
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Metropolis" . ?e <production_company> ?e_1 . ?e_1 <pred:name> "TriStar Pictures" .   } UNION { ?e <pred:name> "Madagascar 3: Europe's Most Wanted" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Metropolis