Question: Which movie is shorter, The Fifth Element (the one whose publication date is 1997-05-09) or The Firm (the one whose script is wrote by John Grisham)?
Choices:
Rebecca
Pleasantville
The Fifth Element
The Hunchback of Notre Dame
Talk to Her
The Towering Inferno
Curse of the Golden Flower
A Prairie Home Companion
Rope
Training Day
Program:
function: Find
inputs: The Fifth Element
function: FilterDate
dependencies: 0
inputs: publication date
1997-05-09
=
function: Find
inputs: John Grisham
function: Relate
dependencies: 2
inputs: screenwriter
backward
function: Find
inputs: The Firm
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Fifth Element" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1997-05-09"^^xsd:date . } UNION { ?e <pred:name> "The Firm" . ?e <screenwriter> ?e_1 . ?e_1 <pred:name> "John Grisham" . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: The Fifth Element