Question: Which is longer, Hope Springs (the one whose publication date is 2012-08-08) or Catch Me If You Can (the one that has Tom Hanks as a cast member)?
Choices:
Hope Springs
Pleasantville
Training Day
A Prairie Home Companion
Curse of the Golden Flower
Catch Me If You Can
Talk to Her
The Towering Inferno
The Fifth Element
The Hunchback of Notre Dame
Answer: Catch Me If You Can
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hope Springs" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "2012-08-08"^^xsd:date . } UNION { ?e <pred:name> "Catch Me If You Can" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Tom Hanks" . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Hope Springs
function: FilterDate
dependencies: 0
inputs: publication date
2012-08-08
=
function: Find
inputs: Tom Hanks
function: Relate
dependencies: 2
inputs: cast member
backward
function: Find
inputs: Catch Me If You Can
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: duration
greater