Question: Which movie is longer, Where the Wild Things Are (the one that has Catherine O'Hara as a voice actor) or The Quiet American (the one whose producer is Joseph L. Mankiewicz)?
Choices:
Rebecca
The Towering Inferno
The Fifth Element
Talk to Her
The Quiet American
Curse of the Golden Flower
A Prairie Home Companion
The Hunchback of Notre Dame
Training Day
Where the Wild Things Are
Program:
function: Find
inputs: Catherine O'Hara
function: Relate
dependencies: 0
inputs: voice actor
backward
function: Find
inputs: Where the Wild Things Are
function: And
dependencies: 1
2
function: Find
inputs: Joseph L. Mankiewicz
function: Relate
dependencies: 4
inputs: producer
backward
function: Find
inputs: The Quiet American
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Where the Wild Things Are" . ?e <voice_actor> ?e_1 . ?e_1 <pred:name> "Catherine O'Hara" .   } UNION { ?e <pred:name> "The Quiet American" . ?e <producer> ?e_2 . ?e_2 <pred:name> "Joseph L. Mankiewicz" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: The Quiet American