Question: Which movie is longer, Stargate Atlantis or Beetlejuice (the one that origins from Canada)?
Choices:
Phineas and Ferb
Saturday Night's Main Event
Robot Chicken
Dancing with the Stars
Bleak House
Stargate Atlantis
Seinfeld
Beetlejuice
Game of Thrones
Six Feet Under
Program:
function: Find
inputs: Stargate Atlantis
function: Find
inputs: Canada
function: Relate
dependencies: 1
inputs: country of origin
backward
function: Find
inputs: Beetlejuice
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Stargate Atlantis" .  } UNION { ?e <pred:name> "Beetlejuice" . ?e <country_of_origin> ?e_1 . ?e_1 <pred:name> "Canada" .   } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Stargate Atlantis