feat: refs #8007 Added country salesByWeek
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-11-12 14:08:29 +01:00
parent 8308bad100
commit 4d3884f5c1
1 changed files with 1 additions and 1 deletions

View File

@ -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