Question: Which movie is longer, Detroit (the one that has Anthony Mackie as a cast member) or Monte Carlo (the one whose publication date is 1930-01-01)?
Choices:
Detroit
Rebecca
Talk to Her
The Fifth Element
Training Day
The Hunchback of Notre Dame
Monte Carlo
The Towering Inferno
Pleasantville
Curse of the Golden Flower
Answer: Detroit
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Detroit" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Anthony Mackie" . } UNION { ?e <pred:name> "Monte Carlo" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1930-01-01"^^xsd:date . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Anthony Mackie
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Detroit
function: And
dependencies: 1
2
function: Find
inputs: Monte Carlo
function: FilterDate
dependencies: 4
inputs: publication date
1930-01-01
=
function: SelectBetween
dependencies: 3
5
inputs: duration
greater