22 lines
400 B
MySQL
22 lines
400 B
MySQL
|
WITH x AS (
|
||
|
SELECT
|
||
|
version,
|
||
|
oseas,
|
||
|
customer,
|
||
|
biggroup,
|
||
|
sum(sales_usd),
|
||
|
sum(pounds),
|
||
|
string_agg(distinct mold,', ')
|
||
|
FROM b
|
||
|
left outer join rlarp.molds m ON
|
||
|
m.stlc = b.mold
|
||
|
WHERE
|
||
|
oseas = 2024
|
||
|
GROUP BY
|
||
|
version,
|
||
|
oseas,
|
||
|
customer,
|
||
|
biggroup
|
||
|
)
|
||
|
SELECT * FROM X
|