Question: Which one, The Great Gatsby (the one that has Mia Farrow as a cast member) or Miami Vice (the one whose genre is drama film), has greater duration?
Choices:
Pleasantville
Miami Vice
The Towering Inferno
The Fifth Element
Training Day
The Great Gatsby
Curse of the Golden Flower
Rebecca
A Prairie Home Companion
The Hunchback of Notre Dame
Program:
function: Find
inputs: Mia Farrow
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: The Great Gatsby
function: And
dependencies: 1
2
function: Find
inputs: drama film
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: Miami Vice
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Great Gatsby" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Mia Farrow" .   } UNION { ?e <pred:name> "Miami Vice" . ?e <genre> ?e_2 . ?e_2 <pred:name> "drama film" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: The Great Gatsby