Question: Which movie is longer, Caravaggio (the one whose publication date is 1986-01-01) or Staten Island (the one whose producer is Luc Besson)?
Choices:
Pleasantville
Talk to Her
Staten Island
Rebecca
The Hunchback of Notre Dame
Training Day
The Fifth Element
Caravaggio
Curse of the Golden Flower
A Prairie Home Companion
Answer: Caravaggio
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Caravaggio" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1986-01-01"^^xsd:date . } UNION { ?e <pred:name> "Staten Island" . ?e <producer> ?e_1 . ?e_1 <pred:name> "Luc Besson" . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Caravaggio
function: FilterDate
dependencies: 0
inputs: publication date
1986-01-01
=
function: Find
inputs: Luc Besson
function: Relate
dependencies: 2
inputs: producer
backward
function: Find
inputs: Staten Island
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: duration
greater