Question: Which movie is shorter, Cairo (the one whose publication date is 1942-01-01) or The Hurricane (the one that has Dan Hedaya as a cast member)?
Choices: Pleasantville
Curse of the Golden Flower
Cairo
Rebecca
The Fifth Element
The Hurricane
A Prairie Home Companion
Talk to Her
The Towering Inferno
Training Day
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Cairo" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1942-01-01"^^xsd:date . } UNION { ?e <pred:name> "The Hurricane" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Dan Hedaya" . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Cairo
function: FilterDate
dependencies: 0
inputs: publication date
1942-01-01
=
function: Find
inputs: Dan Hedaya
function: Relate
dependencies: 2
inputs: cast member
backward
function: Find
inputs: The Hurricane
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: duration
less
Answer: Cairo