|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.SeriesStats
|
|
|
|
SeriesId,
|
|
|
|
SeriesId,
|
|
|
|
SUM(CASE WHEN Ignored = 0 AND Airdate <= @currentDate THEN 1 ELSE 0 END) AS EpisodeCount,
|
|
|
|
SUM(CASE WHEN Ignored = 0 AND Airdate <= @currentDate THEN 1 ELSE 0 END) AS EpisodeCount,
|
|
|
|
SUM(CASE WHEN Ignored = 0 AND Episodes.EpisodeFileId > 0 AND AirDate <= @currentDate THEN 1 ELSE 0 END) as EpisodeFileCount,
|
|
|
|
SUM(CASE WHEN Ignored = 0 AND Episodes.EpisodeFileId > 0 AND AirDate <= @currentDate THEN 1 ELSE 0 END) as EpisodeFileCount,
|
|
|
|
MAX(Episodes.SeasonNumber) as NumberOfSeasons,
|
|
|
|
MAX(Episodes.SeasonNumber) as SeasonCount,
|
|
|
|
MIN(CASE WHEN AirDate < @currentDate THEN NULL ELSE AirDate END) as NextAiringString
|
|
|
|
MIN(CASE WHEN AirDate < @currentDate THEN NULL ELSE AirDate END) as NextAiringString
|
|
|
|
FROM Episodes
|
|
|
|
FROM Episodes
|
|
|
|
GROUP BY SeriesId";
|
|
|
|
GROUP BY SeriesId";
|
|
|
|