Question: Which is longer, Team America: World Police or Cold Mountain whose genre is film based on literature?
Choices:
Training Day
The Fifth Element
Rebecca
The Hunchback of Notre Dame
The Towering Inferno
Talk to Her
Team America: World Police
Pleasantville
Cold Mountain
A Prairie Home Companion
Answer: Cold Mountain
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Team America: World Police" .  } UNION { ?e <pred:name> "Cold Mountain" . ?e <genre> ?e_1 . ?e_1 <pred:name> "film based on literature" .   } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Team America: World Police
function: Find
inputs: film based on literature
function: Relate
dependencies: 1
inputs: genre
backward
function: Find
inputs: Cold Mountain
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: duration
greater