Question: Which has a greater duration, Transformers: Dark of the Moon (which was shot in Los Angeles) or Bad Teacher (whose release region is Canada)?
Choices: The Towering Inferno
Transformers: Dark of the Moon
Training Day
Talk to Her
Rebecca
The Fifth Element
The Hunchback of Notre Dame
A Prairie Home Companion
Curse of the Golden Flower
Bad Teacher
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Transformers: Dark of the Moon" . ?e <filming_location> ?e_1 . ?e_1 <pred:name> "Los Angeles" .   } UNION { ?e <pred:name> "Bad Teacher" . ?e <film_release_region> ?e_2 . ?e_2 <pred:name> "Canada" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Los Angeles
function: Relate
dependencies: 0
inputs: filming location
backward
function: Find
inputs: Transformers: Dark of the Moon
function: And
dependencies: 1
2
function: Find
inputs: Canada
function: Relate
dependencies: 4
inputs: film release region
backward
function: Find
inputs: Bad Teacher
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
Answer: Transformers: Dark of the Moon