Отчёт о поставках

This commit is contained in:
2024-11-21 11:41:31 +03:00
parent 54cf175b00
commit da90fe023f
5 changed files with 24 additions and 13 deletions

View File

@@ -0,0 +1,8 @@
SELECT
s.name AS Поставщик,
SUM(reports.count) AS 'Количество поставок',
SUM(reports.sum) AS Сумма
FROM reports
JOIN sellers s ON reports.item_id = s.sel_id
WHERE report_category_id = '$id' AND (month = '$month' AND year = '$year')
GROUP BY s.name;