convert to dollars
This commit is contained in:
parent
ddb4977a5a
commit
769bd7ff29
@ -33,10 +33,10 @@ SELECT
|
||||
--,os.glec
|
||||
--,m.biggroup
|
||||
--,os.priceg
|
||||
,COALESCE(sum(pounds) filter (WHERE sseas = 2023 AND version = 'Actual'),0) "Actual 2023"
|
||||
,COALESCE(sum(pounds) filter (WHERE sseas = 2024 AND version = 'Actual'),0) "Actual 2024"
|
||||
,COALESCE(sum(pounds) filter (WHERE version = 'Actual' AND ostatus LIKE 'Open%' AND rseas <= 2024),0) "Open Ord"
|
||||
--,COALESCE(sum(pounds) filter (WHERE version = 'Quotes'),0) "Quotes"
|
||||
,COALESCE(sum(sales_usd) filter (WHERE sseas = 2023 AND version = 'Actual'),0) "Actual 2023"
|
||||
,COALESCE(sum(sales_usd) filter (WHERE sseas = 2024 AND version = 'Actual'),0) "Actual 2024"
|
||||
,COALESCE(sum(sales_usd) filter (WHERE version = 'Actual' AND ostatus LIKE 'Open%' AND rseas <= 2024),0) "Open Ord"
|
||||
--,COALESCE(sum(sales_usd) filter (WHERE version = 'Quotes'),0) "Quotes"
|
||||
FROM
|
||||
rlarp.osm_stack os
|
||||
LEFT OUTER JOIN rlarp.molds m ON
|
||||
@ -72,7 +72,7 @@ GROUP BY
|
||||
,ship_dba
|
||||
,dsm
|
||||
,sum(sales_usd) sales
|
||||
,sum(pounds) pounds
|
||||
,sum(sales_usd) sales_usd
|
||||
--string_agg(distinct mold,', ')
|
||||
FROM
|
||||
rlarp.osm_stack
|
||||
@ -89,7 +89,7 @@ GROUP BY
|
||||
COALESCE(act.bill_dba,TRIM(bgt.bill_dba)) bill_dba
|
||||
,COALESCE(act.ship_dba,TRIM(bgt.ship_dba)) ship_dba
|
||||
,COALESCE(act.dsm ,TRIM(bgt.dsm )) dsm
|
||||
,COALESCE(SUM(bgt.pounds ),0) "Budget 2024"
|
||||
,COALESCE(SUM(bgt.sales_usd ),0) "Budget 2024"
|
||||
,COALESCE(SUM(act."Actual 2023"),0) "Actual 2023"
|
||||
,COALESCE(SUM(act."Actual 2024"),0) "Actual 2024"
|
||||
,COALESCE(SUM(act."Open Ord" ),0) "Open Ord"
|
||||
|
Loading…
Reference in New Issue
Block a user