swap out returning columns

This commit is contained in:
Trowbridge 2020-02-13 12:48:51 -05:00
parent fb7fdc7959
commit f83746b892

View File

@ -291,25 +291,28 @@ FROM
) )
,insagg AS ( ,insagg AS (
SELECT SELECT
---------customer info-----------------
bill_cust_descr bill_cust_descr
,billto_group ,billto_group
,ship_cust_descr ,ship_cust_descr
,shipto_group ,shipto_group
,quota_rep_descr ,quota_rep_descr
,director_descr ,director
,segm ,segm
,mod_chan ,chan
,mod_chansub ,chansub
---------product info------------------
,majg_descr ,majg_descr
,ming_descr ,ming_descr
,majs_descr ,majs_descr
,mins_descr ,mins_descr
,brand --,brand
,part_family --,part_family
,part_group ,part_group
,branding ,branding
,color --,color
,part_descr ,part_descr
---------dates-------------------------
,order_season ,order_season
,order_month ,order_month
,ship_season ,ship_season
@ -319,6 +322,7 @@ SELECT
,promo ,promo
,version ,version
,iter ,iter
--------values-------------------------
,sum(value_loc) value_loc ,sum(value_loc) value_loc
,sum(value_usd) value_usd ,sum(value_usd) value_usd
,sum(cost_loc) cost_loc ,sum(cost_loc) cost_loc
@ -327,25 +331,28 @@ SELECT
FROM FROM
ins ins
GROUP BY GROUP BY
---------customer info-----------------
bill_cust_descr bill_cust_descr
,billto_group ,billto_group
,ship_cust_descr ,ship_cust_descr
,shipto_group ,shipto_group
,quota_rep_descr ,quota_rep_descr
,director_descr ,director
,segm ,segm
,mod_chan ,chan
,mod_chansub ,chansub
---------product info------------------
,majg_descr ,majg_descr
,ming_descr ,ming_descr
,majs_descr ,majs_descr
,mins_descr ,mins_descr
,brand --,brand
,part_family --,part_family
,part_group ,part_group
,branding ,branding
,color --,color
,part_descr ,part_descr
---------dates-------------------------
,order_season ,order_season
,order_month ,order_month
,ship_season ,ship_season