select
#columns#
sum(t.ACT_COUNT) as ACT_COUNT,
sum(t.ACT_WEIGHT) as ACT_WEIGHT,
sum(t.ACT_LEN) as ACT_LEN
FROM YDM_ZC_INLIST t
left join ydm_bs_storage s
on t.storage_no = s.storage_no
left join SLM_ORDER_HEAD d on
t.ord_pk = d.ord_pk
left join slm_order_line_delivery g on t.ord_ln_dly_pk = g.ord_ln_dly_pk
left join COM_BASE_GRADE t1 on t1.GRADECODE=t.GRADECODE and t1.VALIDFLAG = '1'
LEFT JOIN (SELECT TH_ORDER_NO_SEQ from PLN_ORDER_ZG_S GROUP BY TH_ORDER_NO_SEQ) ZG ON t.ORDER_NO || '/' || t.ORDER_SEQ = ZG.TH_ORDER_NO_SEQ
where 1=1
and t.INSTOCK_TYPE_CODE in('800701','800702','800704','800712') and t.VALIDFLAG ='1' #conditions#
select
#columns#
sum(t.ACT_COUNT) as ACT_COUNT,
sum(t.ACT_WEIGHT) as ACT_WEIGHT,
sum(t.ACT_LEN) as ACT_LEN,
nvl(sum(t.PACK_NO),0) PACK_NO
FROM YDM_ZC_INLIST t
left join ydm_bs_storage s
on t.storage_no = s.storage_no
where 1=1
and t.INSTOCK_TYPE_CODE in('800701','800702','800703','800704') and t.VALIDFLAG ='1' #conditions#
select
#columns#
sum(t.ACT_COUNT) as ACT_COUNT,
sum(t.ACT_WEIGHT) as ACT_WEIGHT,
sum(t.ACT_LEN) as ACT_LEN,
nvl(sum(t.PACK_NO),0) PACK_NO
FROM YDM_ZC_INLIST t
left join ydm_bs_storage s
on t.storage_no = s.storage_no
where 1=1
and t.VALIDFLAG ='1' #conditions#