WIP: feat: refs #8007 Added country salesByWeek #3190

Draft
guillermo wants to merge 3 commits from 8007-salesByWeek into dev
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 4d3884f5c1 - Show all commits

View File

@ -125,7 +125,7 @@ BEGIN
TRUNCATE salesByWeek; 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) SELECT YEAR(s.dated), WEEK(s.dated, 4), c.countryFk, SUM(s.amount)
FROM sale s FROM sale s
JOIN client c ON c.id = s.clientFk JOIN client c ON c.id = s.clientFk