From ed1cd2b074b12365bdbf8536366bb99a83004849 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 30 Jul 2021 12:13:34 +0000 Subject: [PATCH] change iterations in monthly adjustments --- route_sql/scenario_package.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/route_sql/scenario_package.sql b/route_sql/scenario_package.sql index c11a503..b05aad4 100644 --- a/route_sql/scenario_package.sql +++ b/route_sql/scenario_package.sql @@ -96,11 +96,11 @@ GROUP BY ,seq ,SUM(units) FILTER (WHERE order_season = 2021) "2021 qty" ,SUM(units) FILTER (WHERE order_season = 2022 AND iter IN ('copy','short ship','bad_ship','plan')) "2022 base qty" - ,SUM(units) FILTER (WHERE order_season = 2022 AND iter NOT IN ('copy','short ship','bad_ship','diff','pf')) "2022 adj qty" + ,SUM(units) FILTER (WHERE order_season = 2022 AND iter NOT IN ('copy','short ship','bad_ship','plan')) "2022 adj qty" ,SUM(units) FILTER (WHERE order_season = 2022) "2022 tot qty" ,SUM(value_usd) FILTER (WHERE order_season = 2021) "2021 value_usd" ,SUM(value_usd) FILTER (WHERE order_season = 2022 AND iter IN ('copy','short ship','bad_ship','plan')) "2022 base value_usd" - ,SUM(value_usd) FILTER (WHERE order_season = 2022 AND iter NOT IN ('copy','short ship','bad_ship','diff','pf')) "2022 adj value_usd" + ,SUM(value_usd) FILTER (WHERE order_season = 2022 AND iter NOT IN ('copy','short ship','bad_ship','plan')) "2022 adj value_usd" ,SUM(value_usd) FILTER (WHERE order_season = 2022) "2022 tot value_usd" FROM months