Professional Documents
Culture Documents
where sbc.item_sbc_key=sl.ITEM_sbc_KEY
and sbc.item_class_key= clas.item_class_key
and clas.ITEM_SBDEPT_KEY=sbdept.item_sbdept_key
and sbdept.item_dept_key=d.item_dept_key
and d.item_grp_key=grp.item_grp_key
and div.item_div_key=grp.item_div_key
and day_key=20140320
group by sbc.sbc_cd
order by sbc.sbc_cd;
---SKU Level
Select sku.sku_item_nbr, sum(net_amt)
from
DWD_RTL_SL_RETRN_ITEM_DAY sl, dwv_time_day t,
dwr_sku_item sku, dwr_item item, dwr_item_sbc sbc, dwr_item_class clas, dwr_item
_sbdept sbdept, dwr_item_dept dept,
dwr_item_grp grp, dwr_item_div div
where
sku.SKU_ITEM_KEY=sl.SKU_ITEM_KEY
and sku.ITEM_KEY=item.item_key
and item.ITEM_SBC_KEY=sbc.ITEM_SBC_KEY
and sbc.item_class_key= clas.item_class_key
and clas.ITEM_SBDEPT_KEY=sbdept.item_sbdept_key
and sbdept.item_dept_key=dept.item_dept_key