Question: Which movie is shorter, Caravaggio (the one whose color is black-and-white) or The Count of Monte Cristo (the one whose publication date is 1954-01-01)?
Choices:
Rebecca
The Fifth Element
A Prairie Home Companion
The Count of Monte Cristo
The Hunchback of Notre Dame
Curse of the Golden Flower
Training Day
Caravaggio
The Towering Inferno
Pleasantville
Program:
function: Find
inputs: black-and-white
function: Relate
dependencies: 0
inputs: color
backward
function: Find
inputs: Caravaggio
function: And
dependencies: 1
2
function: Find
inputs: The Count of Monte Cristo
function: FilterDate
dependencies: 4
inputs: publication date
1954-01-01
=
function: SelectBetween
dependencies: 3
5
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Caravaggio" . ?e <color> ?e_1 . ?e_1 <pred:name> "black-and-white" . } UNION { ?e <pred:name> "The Count of Monte Cristo" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1954-01-01"^^xsd:date . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Caravaggio