Question: Which movie is longer, Hairspray (the one that has Debbie Harry as a cast member) or Miami Vice (the one that has Justin Theroux as a cast member)?
Choices:
Pleasantville
The Towering Inferno
Rebecca
The Hunchback of Notre Dame
A Prairie Home Companion
Miami Vice
Hairspray
The Fifth Element
Curse of the Golden Flower
Training Day
Program:
function: Find
inputs: Debbie Harry
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Hairspray
function: And
dependencies: 1
2
function: Find
inputs: Justin Theroux
function: Relate
dependencies: 4
inputs: cast member
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> "Hairspray" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Debbie Harry" .   } UNION { ?e <pred:name> "Miami Vice" . ?e <cast_member> ?e_2 . ?e_2 <pred:name> "Justin Theroux" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Miami Vice