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

9 lines
316 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

SELECT
s.name AS Поставщик,
reports.sum AS 'Сумма в рублях',
reports.count 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
ORDER BY s.name;