update so 2023 is full year

This commit is contained in:
Paul Trowbridge 2024-01-31 16:58:20 -05:00
parent 696f478a54
commit 1b6be47743

View File

@ -35,7 +35,7 @@ SELECT
--,os.glec
--,m.biggroup
--,os.priceg
,COALESCE(sum(pounds) filter (WHERE sseas = 2023 AND version = 'Actual' AND SUBSTRING(smon,1,2) <= '09'),0) "Actual 2023"
,COALESCE(sum(pounds) filter (WHERE sseas = 2023 AND version = 'Actual' AND SUBSTRING(smon,1,2) <= '12'),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"
@ -201,7 +201,7 @@ SELECT
,m.biggroup
--,os.priceg
,COALESCE(sum(pounds) filter (WHERE oseas = 2024 AND version = 'Budget'),0) "Budget 2024"
,COALESCE(sum(pounds) filter (WHERE sseas = 2023 AND version = 'Actual' AND SUBSTRING(smon,1,2) <= '09'),0) "Actual 2023"
,COALESCE(sum(pounds) filter (WHERE sseas = 2023 AND version = 'Actual' AND SUBSTRING(smon,1,2) <= '12'),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"