From 7aff54ad0dd1c4015d1c33efa3ec0c03ba3d5596 Mon Sep 17 00:00:00 2001 From: Alban Dumouilla Date: Thu, 28 Nov 2024 16:00:22 +0100 Subject: [PATCH] Add distinctconversations to getAssistantsUsageData --- front/lib/workspace_usage.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/front/lib/workspace_usage.ts b/front/lib/workspace_usage.ts index 97093cdfa662..e819fb75c82e 100644 --- a/front/lib/workspace_usage.ts +++ b/front/lib/workspace_usage.ts @@ -421,6 +421,7 @@ export async function getAssistantsUsageData( ARRAY_AGG(DISTINCT aut."email") AS "authorEmails", COUNT(a."id") AS "messages", COUNT(DISTINCT u."id") AS "distinctUsersReached", + COUNT(DISTINCT m."conversationId") AS "distinctConversations", MAX(CAST(ac."createdAt" AS DATE)) AS "lastEdit" FROM "agent_messages" a