Question: Which movie is longer, Hans Christian Andersen (the one that origins from United States of America) or David Copperfield (the one whose original language is Danish)?
Choices:
David Copperfield
The Towering Inferno
The Fifth Element
Pleasantville
Rebecca
Training Day
Talk to Her
A Prairie Home Companion
Hans Christian Andersen
The Hunchback of Notre Dame
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: country of origin
backward
function: Find
inputs: Hans Christian Andersen
function: And
dependencies: 1
2
function: Find
inputs: Danish
function: Relate
dependencies: 4
inputs: original language of film or TV show
backward
function: Find
inputs: David Copperfield
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hans Christian Andersen" . ?e <country_of_origin> ?e_1 . ?e_1 <pred:name> "United States of America" .   } UNION { ?e <pred:name> "David Copperfield" . ?e <original_language_of_film_or_TV_show> ?e_2 . ?e_2 <pred:name> "Danish" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: David Copperfield