Question: Which has a lesser duration, Rock of Ages (whose release region is Peru) or Happy Together (whose release region is Japan)?
Choices:
Training Day
A Prairie Home Companion
Curse of the Golden Flower
The Hunchback of Notre Dame
Happy Together
Rock of Ages
Rebecca
Pleasantville
The Towering Inferno
The Fifth Element
Program:
function: Find
inputs: Peru
function: Relate
dependencies: 0
inputs: film release region
backward
function: Find
inputs: Rock of Ages
function: And
dependencies: 1
2
function: Find
inputs: Japan
function: Relate
dependencies: 4
inputs: film release region
backward
function: Find
inputs: Happy Together
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Rock of Ages" . ?e <film_release_region> ?e_1 . ?e_1 <pred:name> "Peru" .   } UNION { ?e <pred:name> "Happy Together" . ?e <film_release_region> ?e_2 . ?e_2 <pred:name> "Japan" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Happy Together