vault backup: 2023-10-16 16:44:36
This commit is contained in:
parent
c1f11d4c8f
commit
bb9b1a6d8a
21
sql/budget.sql
Normal file
21
sql/budget.sql
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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
|
20
sql/budgetc.sql
Normal file
20
sql/budgetc.sql
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
WITH x AS (
|
||||||
|
SELECT
|
||||||
|
version,
|
||||||
|
oseas,
|
||||||
|
customer,
|
||||||
|
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
|
||||||
|
AND version = 'Forecats'
|
||||||
|
GROUP BY
|
||||||
|
version,
|
||||||
|
oseas,
|
||||||
|
customer
|
||||||
|
)
|
||||||
|
SELECT * FROM X
|
Loading…
Reference in New Issue
Block a user