Question: Which movie is longer, Rent (the one that has Sarah Silverman as a cast member) or Cosmopolis (the one whose release region is Italy)?
Choices:
Rent
The Hunchback of Notre Dame
The Fifth Element
Curse of the Golden Flower
Training Day
Pleasantville
A Prairie Home Companion
Talk to Her
Cosmopolis
The Towering Inferno
Program:
function: Find
inputs: Sarah Silverman
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Rent
function: And
dependencies: 1
2
function: Find
inputs: Italy
function: Relate
dependencies: 4
inputs: film release region
backward
function: Find
inputs: Cosmopolis
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Rent" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Sarah Silverman" .   } UNION { ?e <pred:name> "Cosmopolis" . ?e <film_release_region> ?e_2 . ?e_2 <pred:name> "Italy" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Rent