Question: Which movie is longer, Iron Man (the one whose publication date is 1931-01-01) or The Merry Widow (the one whose publication date is 1962-01-01)?
Choices:
The Towering Inferno
Iron Man
A Prairie Home Companion
Rebecca
Pleasantville
Talk to Her
Training Day
Curse of the Golden Flower
The Merry Widow
The Fifth Element
Program:
function: Find
inputs: Iron Man
function: FilterDate
dependencies: 0
inputs: publication date
1931-01-01
=
function: Find
inputs: The Merry Widow
function: FilterDate
dependencies: 2
inputs: publication date
1962-01-01
=
function: SelectBetween
dependencies: 1
3
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Iron Man" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1931-01-01"^^xsd:date . } UNION { ?e <pred:name> "The Merry Widow" . ?e <publication_date> ?pv_2 . ?pv_2 <pred:date> "1962-01-01"^^xsd:date . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: The Merry Widow