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