Question: Which has greater duration, Alvin and the Chipmunks: The Squeakquel or Bedtime Stories (whose production company is Happy Madison Productions)?
Choices:
Bedtime Stories
The Flintstones
John Carter
National Treasure: Book of Secrets
Alvin and the Chipmunks: The Squeakquel
Old Dogs
Holes
The Flintstones in Viva Rock Vegas
Alvin and the Chipmunks: Chipwrecked
The Muppets
Program:
function: Find
inputs: Alvin and the Chipmunks: The Squeakquel
function: Find
inputs: Happy Madison Productions
function: Relate
dependencies: 1
inputs: production company
backward
function: Find
inputs: Bedtime Stories
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Alvin and the Chipmunks: The Squeakquel" .  } UNION { ?e <pred:name> "Bedtime Stories" . ?e <production_company> ?e_1 . ?e_1 <pred:name> "Happy Madison Productions" .   } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Bedtime Stories