Question: Does 24 (the one that has Bob Gunton as a cast member) or Get Smart (the one whose start time is 1965-09-18) have the greater number of episodes?
Choices: Saturday Night's Main Event
Get Smart
Phineas and Ferb
Dancing with the Stars
Seinfeld
24
Bleak House
Six Feet Under
Robot Chicken
Game of Thrones
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "24" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Bob Gunton" . } UNION { ?e <pred:name> "Get Smart" . ?e <start_time> ?pv_1 . ?pv_1 <pred:date> "1965-09-18"^^xsd:date . } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Bob Gunton
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: 24
function: And
dependencies: 1
2
function: Find
inputs: Get Smart
function: FilterDate
dependencies: 4
inputs: start time
1965-09-18
=
function: SelectBetween
dependencies: 3
5
inputs: number of episodes
greater
Answer: 24