From 1b6be477432ff866f11c1ac98b7c86e19d056faa Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 31 Jan 2024 16:58:20 -0500 Subject: [PATCH] update so 2023 is full year --- sql/schema.pg.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/schema.pg.sql b/sql/schema.pg.sql index 4a4a10a..1c4f42b 100644 --- a/sql/schema.pg.sql +++ b/sql/schema.pg.sql @@ -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"