hive 多表连接查询并将结果存入新表

insert overwrite table table2
select d.nsr
from (select a.nsr_id as nsr
from nsrxx a
inner join zzsfp b
on b.gf_id = a.nsr_id
group by a.nsr_id) as d
where nsr not in (select a.nsr_id
from nsrxx a
inner join zzsfp b
on b.xf_id = a.nsr_id
group by a.nsr_id);
posted @ 2021-10-23 22:47  帅超007  阅读(1087)  评论(0编辑  收藏  举报