vault backup: 2023-10-16 16:44:36

This commit is contained in:
Paul Trowbridge 2023-10-16 16:44:36 -04:00
parent c1f11d4c8f
commit bb9b1a6d8a
2 changed files with 41 additions and 0 deletions

21
sql/budget.sql Normal file
View 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
View 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