Question: Which movie cost more to make, Ben-Hur (the one that has Morgan Freeman as a cast member) or Frankenstein (the one whose genre is romance film)?
Choices:
Training Day
Rebecca
The Towering Inferno
A Prairie Home Companion
Frankenstein
Pleasantville
The Fifth Element
Ben-Hur
Talk to Her
Curse of the Golden Flower
Answer: Ben-Hur
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Ben-Hur" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Morgan Freeman" .   } UNION { ?e <pred:name> "Frankenstein" . ?e <genre> ?e_2 . ?e_2 <pred:name> "romance film" .  } ?e <cost> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Morgan Freeman
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Ben-Hur
function: And
dependencies: 1
2
function: Find
inputs: romance film
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: Frankenstein
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: cost
greater