Question: Which one is shorter, Hamlet (the one whose publication date is 1921-01-01) or The Poseidon Adventure (the one whose genre is drama film) ?
Choices:
Curse of the Golden Flower
A Prairie Home Companion
The Poseidon Adventure
Pleasantville
The Fifth Element
Hamlet
The Towering Inferno
The Hunchback of Notre Dame
Training Day
Talk to Her
Program:
function: Find
inputs: Hamlet
function: FilterDate
dependencies: 0
inputs: publication date
1921-01-01
=
function: Find
inputs: drama film
function: Relate
dependencies: 2
inputs: genre
backward
function: Find
inputs: The Poseidon Adventure
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hamlet" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1921-01-01"^^xsd:date . } UNION { ?e <pred:name> "The Poseidon Adventure" . ?e <genre> ?e_1 . ?e_1 <pred:name> "drama film" . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: The Poseidon Adventure