Question: Which movie cost less, Batman Returns (the one that has Michelle Pfeiffer as a cast member) or West Side Story (the one that was nominated for Academy Award for Best Director)?
Choices:
Curse of the Golden Flower
Pleasantville
West Side Story
A Prairie Home Companion
The Towering Inferno
The Hunchback of Notre Dame
Training Day
The Fifth Element
Talk to Her
Batman Returns
Answer: West Side Story
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Batman Returns" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Michelle Pfeiffer" .   } UNION { ?e <pred:name> "West Side Story" . ?e <nominated_for> ?e_2 . ?e_2 <pred:name> "Academy Award for Best Director" .  } ?e <cost> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Michelle Pfeiffer
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Batman Returns
function: And
dependencies: 1
2
function: Find
inputs: Academy Award for Best Director
function: Relate
dependencies: 4
inputs: nominated for
backward
function: Find
inputs: West Side Story
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: cost
less