Question: Which show has more episodes, The Fall (the one whose end time is 2016-10-28) or St. Elsewhere?
Choices:
Bleak House
Phineas and Ferb
The Fall
Dancing with the Stars
American Horror Story
Game of Thrones
St. Elsewhere
Saturday Night's Main Event
Six Feet Under
Robot Chicken
Answer: St. Elsewhere
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Fall" . ?e <end_time> ?pv_1 . ?pv_1 <pred:date> "2016-10-28"^^xsd:date . } UNION { ?e <pred:name> "St. Elsewhere" . } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: The Fall
function: FilterDate
dependencies: 0
inputs: end time
2016-10-28
=
function: Find
inputs: St. Elsewhere
function: SelectBetween
dependencies: 1
2
inputs: number of episodes
greater