Question: Which movie is longer, The Amazing Spider-Man (the one whose production company is Marvel Entertainment) or Hamlet (the one whose title is Гамлет)?
Choices:
Talk to Her
Training Day
Curse of the Golden Flower
Pleasantville
Rebecca
A Prairie Home Companion
Hamlet
The Fifth Element
The Towering Inferno
The Hunchback of Notre Dame
Program:
function: Find
inputs: Marvel Entertainment
function: Relate
dependencies: 0
inputs: production company
backward
function: Find
inputs: The Amazing Spider-Man
function: And
dependencies: 1
2
function: Find
inputs: Hamlet
function: FilterStr
dependencies: 4
inputs: title
Гамлет
function: SelectBetween
dependencies: 3
5
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Amazing Spider-Man" . ?e <production_company> ?e_1 . ?e_1 <pred:name> "Marvel Entertainment" . } UNION { ?e <pred:name> "Hamlet" . ?e <title> ?pv_1 . ?pv_1 <pred:value> "Гамлет" . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Hamlet