Question: Which movie is shorter, The Lord of the Rings (the one that is written by J. R. R. Tolkien) or Shrek Forever After (the one whose publication date is 2010-07-08)?
Choices:
Winnie the Pooh
The Lord of the Rings
WALL·E
Aladdin
Shrek Forever After
Shrek 2
Lilo & Stitch
The Rescuers
Peter Pan
Renaissance
Answer: Shrek Forever After
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Lord of the Rings" . ?e <after_a_work_by> ?e_1 . ?e_1 <pred:name> "J. R. R. Tolkien" . } UNION { ?e <pred:name> "Shrek Forever After" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "2010-07-08"^^xsd:date . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: J. R. R. Tolkien
function: Relate
dependencies: 0
inputs: after a work by
backward
function: Find
inputs: The Lord of the Rings
function: And
dependencies: 1
2
function: Find
inputs: Shrek Forever After
function: FilterDate
dependencies: 4
inputs: publication date
2010-07-08
=
function: SelectBetween
dependencies: 3
5
inputs: duration
less