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/Requests/sql/ship_seller.sql

8 lines
357 B
SQL

SELECT w.date_of_delivery AS 'Дата поставки',
SUM(w.sum) AS 'Общая сумма',
SUM(wl.cnt) as 'Количество'
FROM waybill w
JOIN (SELECT waybill_id, SUM(count) AS cnt FROM waybill_lines wl GROUP BY waybill_id)wl USING (waybill_id)
JOIN sellers USING(sel_id)
WHERE sellers.name = '${seller}'
GROUP BY date_of_delivery