Question: Is Saw IV or The Mummy Returns, with cast member Dwayne Johnson, the longer of the two?
Choices:
The Towering Inferno
Training Day
The Mummy Returns
Talk to Her
Saw IV
The Hunchback of Notre Dame
Rebecca
Curse of the Golden Flower
A Prairie Home Companion
The Fifth Element
Program:
function: Find
inputs: Saw IV
function: Find
inputs: Dwayne Johnson
function: Relate
dependencies: 1
inputs: cast member
backward
function: Find
inputs: The Mummy Returns
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Saw IV" .  } UNION { ?e <pred:name> "The Mummy Returns" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Dwayne Johnson" .   } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: The Mummy Returns