From 4d3884f5c1ebfd26476eeb5423199ad484d4ca7b Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 12 Nov 2024 14:08:29 +0100 Subject: [PATCH] feat: refs #8007 Added country salesByWeek --- db/routines/bs/procedures/indicatorsUpdate.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/bs/procedures/indicatorsUpdate.sql b/db/routines/bs/procedures/indicatorsUpdate.sql index 35c9a822f..5dbf5f8f6 100644 --- a/db/routines/bs/procedures/indicatorsUpdate.sql +++ b/db/routines/bs/procedures/indicatorsUpdate.sql @@ -125,7 +125,7 @@ BEGIN TRUNCATE salesByWeek; - INSERT INTO salesByWeek (`year`, `week`, countryFk, sales) + INSERT INTO salesByWeek (`year`, `week`, countryFk, total) SELECT YEAR(s.dated), WEEK(s.dated, 4), c.countryFk, SUM(s.amount) FROM sale s JOIN client c ON c.id = s.clientFk