Question: Which movie is longer, Shark Tale (the one whose publication date is 2004-10-01) or Ratatouille (the one whose publication date is 2007-10-03)?
Choices:
Shark Tale
WALL·E
Ratatouille
Renaissance
Shrek 2
Beauty and the Beast
Lilo & Stitch
Peter Pan
The Rescuers
Aladdin
Answer: Ratatouille
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Shark Tale" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "2004-10-01"^^xsd:date . } UNION { ?e <pred:name> "Ratatouille" . ?e <publication_date> ?pv_2 . ?pv_2 <pred:date> "2007-10-03"^^xsd:date . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Shark Tale
function: FilterDate
dependencies: 0
inputs: publication date
2004-10-01
=
function: Find
inputs: Ratatouille
function: FilterDate
dependencies: 2
inputs: publication date
2007-10-03
=
function: SelectBetween
dependencies: 1
3
inputs: duration
greater