hardcode notion of baseline iterations into monthly baseline

This commit is contained in:
Paul Trowbridge 2019-03-15 12:53:21 -04:00
parent 4ba6aaa2d0
commit 7f5277546b

View File

@ -70,12 +70,12 @@ GROUP BY
order_month
,seq
,SUM(units) FILTER (WHERE order_season = 2019) "2019 qty"
,SUM(units) FILTER (WHERE order_season = 2020 AND iter = 'copy') "2020 base qty"
,SUM(units) FILTER (WHERE order_season = 2020 AND iter <> 'copy') "2020 adj qty"
,SUM(units) FILTER (WHERE order_season = 2020 AND iter IN ('copy','short ship','bad_ship')) "2020 base qty"
,SUM(units) FILTER (WHERE order_season = 2020 AND iter NOT IN ('copy','short ship','bad_ship')) "2020 adj qty"
,SUM(units) FILTER (WHERE order_season = 2020) "2020 tot qty"
,SUM(value_usd) FILTER (WHERE order_season = 2019) "2019 value_usd"
,SUM(value_usd) FILTER (WHERE order_season = 2020 AND iter = 'copy') "2020 base value_usd"
,SUM(value_usd) FILTER (WHERE order_season = 2020 AND iter <> 'copy') "2020 adj value_usd"
,SUM(value_usd) FILTER (WHERE order_season = 2020 AND iter IN ('copy','short ship','bad_ship')) "2020 base value_usd"
,SUM(value_usd) FILTER (WHERE order_season = 2020 AND iter NOT IN ('copy','short ship','bad_ship')) "2020 adj value_usd"
,SUM(value_usd) FILTER (WHERE order_season = 2020) "2020 tot value_usd"
FROM
months