Question: Which movie is longer, Great Expectations (the one that has Jean Simmons as a cast member) or I Love You, Man?
Choices:
A Prairie Home Companion
The Towering Inferno
Talk to Her
I Love You, Man
Training Day
Curse of the Golden Flower
Rebecca
Great Expectations
The Hunchback of Notre Dame
Pleasantville
Program:
function: Find
inputs: Jean Simmons
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Great Expectations
function: And
dependencies: 1
2
function: Find
inputs: I Love You, Man
function: SelectBetween
dependencies: 3
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Great Expectations" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Jean Simmons" .   } UNION { ?e <pred:name> "I Love You, Man" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Great Expectations