increment year
This commit is contained in:
parent
fd4079cb17
commit
5dc5a11489
@ -36,7 +36,7 @@ FROM
|
|||||||
rlarp.osm_pool
|
rlarp.osm_pool
|
||||||
WHERE
|
WHERE
|
||||||
where_clause
|
where_clause
|
||||||
AND order_season IN (2021,2022)
|
AND order_season IN (2023,2024)
|
||||||
GROUP BY
|
GROUP BY
|
||||||
order_season
|
order_season
|
||||||
,order_month
|
,order_month
|
||||||
@ -94,14 +94,14 @@ GROUP BY
|
|||||||
SELECT
|
SELECT
|
||||||
order_month
|
order_month
|
||||||
,seq
|
,seq
|
||||||
,SUM(units) FILTER (WHERE order_season = 2021) "2021 qty"
|
,SUM(units) FILTER (WHERE order_season = 2023) "2023 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 = 2024 AND iter IN ('copy','short ship','bad_ship','plan')) "2024 base 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 = 2024 AND iter NOT IN ('copy','short ship','bad_ship','plan')) "2024 adj qty"
|
||||||
,SUM(units) FILTER (WHERE order_season = 2022) "2022 tot qty"
|
,SUM(units) FILTER (WHERE order_season = 2024) "2024 tot qty"
|
||||||
,SUM(value_usd) FILTER (WHERE order_season = 2021) "2021 value_usd"
|
,SUM(value_usd) FILTER (WHERE order_season = 2023) "2023 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 = 2024 AND iter IN ('copy','short ship','bad_ship','plan')) "2024 base 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 = 2024 AND iter NOT IN ('copy','short ship','bad_ship','plan')) "2024 adj value_usd"
|
||||||
,SUM(value_usd) FILTER (WHERE order_season = 2022) "2022 tot value_usd"
|
,SUM(value_usd) FILTER (WHERE order_season = 2024) "2024 tot value_usd"
|
||||||
FROM
|
FROM
|
||||||
months
|
months
|
||||||
GROUP BY
|
GROUP BY
|
||||||
@ -113,14 +113,14 @@ GROUP BY
|
|||||||
,mlist AS (
|
,mlist AS (
|
||||||
SELECT
|
SELECT
|
||||||
mseq.m order_month
|
mseq.m order_month
|
||||||
,"2021 qty"
|
,"2023 qty"
|
||||||
,"2022 base qty"
|
,"2024 base qty"
|
||||||
,"2022 adj qty"
|
,"2024 adj qty"
|
||||||
,"2022 tot qty"
|
,"2024 tot qty"
|
||||||
,"2021 value_usd"
|
,"2023 value_usd"
|
||||||
,"2022 base value_usd"
|
,"2024 base value_usd"
|
||||||
,"2022 adj value_usd"
|
,"2024 adj value_usd"
|
||||||
,"2022 tot value_usd"
|
,"2024 tot value_usd"
|
||||||
FROM
|
FROM
|
||||||
mseq
|
mseq
|
||||||
LEFT OUTER JOIN mpvt ON
|
LEFT OUTER JOIN mpvt ON
|
||||||
|
Loading…
Reference in New Issue
Block a user