使用create table test as select * from ( select tt.tag_name, tt.tag_id, d.tag_id_unt as dp_tag_id_unt from ( select 'oneip_explode' as tag_name, tag_id_cf as tag_id, count(1) as tag_id_unt, 3593758 as crowd_unt, tag_unt, 1 as confid_sum from di_dwb.tmp_zhy_0820_1 group by tag_id_cf, tag_unt ) tt left join (select * from di_dwb.dwb_par_multi_tag_user_portrait_wd d where d.pt_w='3000-12-31') d on tt.tag_name = d.tag_name and tt.tag_id = d.tag_id ) t1;
建立新表test后,
select
count(1)
from
(
select
tt.tag_name,
tt.tag_id,
d.tag_id_unt as dp_tag_id_unt
from
(
select
'oneip_explode' as tag_name,
tag_id_cf as tag_id,
count(1) as tag_id_unt,
3593758 as crowd_unt,
tag_unt,
1 as confid_sum
from
di_dwb.tmp_zhy_0820_1
group by
tag_id_cf,
tag_unt
) tt
left join (select * from di_dwb.dwb_par_multi_tag_user_portrait_wd d where d.pt_w='3000-12-31') d
on tt.tag_name = d.tag_name
and tt.tag_id = d.tag_id
) t1 where dp_tag_id_unt is null;
和
select count(1) from di_dwb.test where dp_tag_id_unt is null;
结果不一致,dp_tag_id_unt列null值变多了很多,想请问下这是什么原因
版本2.0.11