Question: Which show has more episodes, Egypt (the one whose distributor is BBC) or Miami Vice (the one whose number of seasons is 5)?
Choices: Robot Chicken
American Horror Story
Miami Vice
Game of Thrones
Phineas and Ferb
Dancing with the Stars
Saturday Night's Main Event
Six Feet Under
Seinfeld
Egypt
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Egypt" . ?e <distributor> ?e_1 . ?e_1 <pred:name> "BBC" . } UNION { ?e <pred:name> "Miami Vice" . ?e <number_of_seasons> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "5"^^xsd:double . } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: BBC
function: Relate
dependencies: 0
inputs: distributor
backward
function: Find
inputs: Egypt
function: And
dependencies: 1
2
function: Find
inputs: Miami Vice
function: FilterNum
dependencies: 4
inputs: number of seasons
5
=
function: SelectBetween
dependencies: 3
5
inputs: number of episodes
greater
Answer: Miami Vice