Отчёт о поставках
This commit is contained in:
8
App/Report/sql/sellers_report.sql
Normal file
8
App/Report/sql/sellers_report.sql
Normal 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;
|
||||
Reference in New Issue
Block a user