Description
SQL:
insert into xxxxxxxxxxxxxxx
select
NVL (area_name, '全省'),
count(
distinct case
when jc_fir_lvl_svctype = '移网'
and is_iot = '0'
and is_mon_dev = '1' then user_id
end
) + count(
distinct case
when jc_fir_lvl_svctype = '宽带'
and is_iot = '0'
and is_mon_dev = '1' then user_id
end
) 发展量,
count(
distinct case
when jc_fir_lvl_svctype = '移网'
and is_iot = '0'
and is_mon_dev = '1' then user_id
end
) 移网发展量,
count(
distinct case
when jc_fir_lvl_svctype = '宽带'
and is_iot = '0'
and is_mon_dev = '1' then user_id
end
) 宽带发展量
from
PER_086_DWE.DWE_V_D_CUS_GRID_USER_INFO_Z
where
month_id = '202405'
and DAY_ID = '29'
and SCENE_2ND in ('城区直销', '农村直销')
and SCENE_TYPE <> '政企'
and collection_type = 'HQ'
group by
rollup (area_name)
输出:
c:\RPA_TEST\python_data_lineage-main>python dlineage.py /t mysql /text /s /f ..\test.sql
..\test.sql is not a text file.
NVL (area_name, '全省') depends on: PER_086_DWE.DWE_V_D_CUS_GRID_USER_INFO_Z.area_name