Question: Which movie is longer, The Kingdom (the one whose release region is United States of America) or Dangerous Liaisons (the one whose director of photography is Philippe Rousselot)?
Choices:
The Hunchback of Notre Dame
Rebecca
The Towering Inferno
Dangerous Liaisons
Curse of the Golden Flower
Talk to Her
The Kingdom
A Prairie Home Companion
The Fifth Element
Pleasantville
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: film release region
backward
function: Find
inputs: The Kingdom
function: And
dependencies: 1
2
function: Find
inputs: Philippe Rousselot
function: Relate
dependencies: 4
inputs: director of photography
backward
function: Find
inputs: Dangerous Liaisons
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Kingdom" . ?e <film_release_region> ?e_1 . ?e_1 <pred:name> "United States of America" .   } UNION { ?e <pred:name> "Dangerous Liaisons" . ?e <director_of_photography> ?e_2 . ?e_2 <pred:name> "Philippe Rousselot" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Dangerous Liaisons