From 714bfcc556177dce2b65a1e58babdf2488e9de13 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 27 Mar 2020 22:26:39 +0100 Subject: Tests for viewsPerDay --- server/models/video/video-channel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/models') diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 5e6541837..78fc3d7e4 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -191,7 +191,7 @@ export type SummaryOptions = { 'SELECT days.day AS day, ' + 'COALESCE(SUM(views.views), 0) AS views ' + 'FROM days ' + - `LEFT JOIN views ON date_trunc('day', "views"."createdAt") = days.day ` + + `LEFT JOIN views ON date_trunc('day', "views"."startDate") = date_trunc('day', days.day) ` + 'GROUP BY 1 ' + 'ORDER BY day ' + ') t' + -- cgit v1.2.3