Question: Which movie is longer, The Count of Monte Cristo (the one whose distributor is United Artists) or Contact (the one whose release region is Germany)?
Choices:
Contact
The Hunchback of Notre Dame
Training Day
Pleasantville
The Count of Monte Cristo
The Towering Inferno
Talk to Her
A Prairie Home Companion
Rebecca
The Fifth Element
Program:
function: Find
inputs: United Artists
function: Relate
dependencies: 0
inputs: distributor
backward
function: Find
inputs: The Count of Monte Cristo
function: And
dependencies: 1
2
function: Find
inputs: Germany
function: Relate
dependencies: 4
inputs: film release region
backward
function: Find
inputs: Contact
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Count of Monte Cristo" . ?e <distributor> ?e_1 . ?e_1 <pred:name> "United Artists" .   } UNION { ?e <pred:name> "Contact" . ?e <film_release_region> ?e_2 . ?e_2 <pred:name> "Germany" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Contact