mirror of https://github.com/Sonarr/Sonarr
Fixed SeriesStats query
This commit is contained in:
parent
3f03a0854a
commit
9330f0aefc
|
@ -57,7 +57,7 @@ namespace NzbDrone.Core.SeriesStats
|
||||||
SUM(CASE WHEN Monitored = 1 AND AirdateUtc <= @currentDate THEN 1 ELSE 0 END) AS EpisodeCount,
|
SUM(CASE WHEN Monitored = 1 AND AirdateUtc <= @currentDate THEN 1 ELSE 0 END) AS EpisodeCount,
|
||||||
SUM(CASE WHEN Monitored = 1 AND Episodes.EpisodeFileId > 0 AND AirDateUtc <= @currentDate THEN 1 ELSE 0 END) AS EpisodeFileCount,
|
SUM(CASE WHEN Monitored = 1 AND Episodes.EpisodeFileId > 0 AND AirDateUtc <= @currentDate THEN 1 ELSE 0 END) AS EpisodeFileCount,
|
||||||
MAX(Episodes.SeasonNumber) as SeasonCount,
|
MAX(Episodes.SeasonNumber) as SeasonCount,
|
||||||
MIN(CASE WHEN AirDateUtc < @currentDate THEN NULL ELSE AirDate END) AS NextAiringString
|
MIN(CASE WHEN AirDateUtc < @currentDate THEN NULL ELSE AirDateUtc END) AS NextAiringString
|
||||||
FROM Episodes";
|
FROM Episodes";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue