This repository has been archived on 2025-10-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
RIS/App/Report/sql/sellers_report.sql
T

8 lines
292 B
SQL

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;