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