Question: Which one, Emma (the one that has Samantha Morton as a cast member) or Christopher Columbus (the one whose number of episodes is 4), has the greater number of episodes?
Choices:
A Streetcar Named Desire
All Quiet on the Western Front
The Late Shift
The Three Musketeers
The Music Man
Christopher Columbus
Emma
A Christmas Carol
The Challenge
The Goodbye Girl
Program:
function: Find
inputs: Samantha Morton
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Emma
function: And
dependencies: 1
2
function: Find
inputs: Christopher Columbus
function: FilterNum
dependencies: 4
inputs: number of episodes
4
=
function: SelectBetween
dependencies: 3
5
inputs: number of episodes
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Emma" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Samantha Morton" . } UNION { ?e <pred:name> "Christopher Columbus" . ?e <number_of_episodes> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "4"^^xsd:double . } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Christopher Columbus