替换 dm_tf_external_sales -> DM_TF_EXT_UNIONALL_SALES(排除 z 01*)
This commit is contained in:
@@ -66,7 +66,7 @@ on t1.ins_cd_nl = t3.inst_code
|
||||
select
|
||||
YYYYMM,
|
||||
inst_code
|
||||
from dm.dm_tf_external_sales
|
||||
from dm.DM_TF_EXT_UNIONALL_SALES
|
||||
where data_source = 'AIA(Monthly)'
|
||||
group by YYYYMM,inst_code
|
||||
having sum(SALES_VALUE_CAL) <> 0
|
||||
@@ -74,7 +74,7 @@ having sum(SALES_VALUE_CAL) <> 0
|
||||
--销量最大月
|
||||
,sales_maxym as (
|
||||
select max(yyyymm) as max_ym
|
||||
from dm.dm_tf_external_sales
|
||||
from dm.DM_TF_EXT_UNIONALL_SALES
|
||||
where data_source = 'AIA(Monthly)'
|
||||
)
|
||||
--无销量的机构,by yyyymm
|
||||
|
||||
Reference in New Issue
Block a user