From ce945c8af0e528887296c795ced5b14c881c5d73 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Sun, 31 May 2026 01:34:35 +0700 Subject: [PATCH] fix(analytics): simplify GROUP BY and ORDER BY clauses in getDailyTrend function --- src/moderation/analyticsStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/moderation/analyticsStore.ts b/src/moderation/analyticsStore.ts index d307177..0c77370 100644 --- a/src/moderation/analyticsStore.ts +++ b/src/moderation/analyticsStore.ts @@ -758,8 +758,8 @@ export async function getDailyTrend(input: { AND created_at >= ? AND deleted_at IS NULL ${channelId ? `AND (channel_id = ? OR thread_id = ?)` : ""} - GROUP BY date(created_at / 1000, 'unixepoch') - ORDER BY date ASC + GROUP BY 1 + ORDER BY 1 ASC `, channelId ? [guildId, since, channelId, channelId] : [guildId, since], );