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);
原文地址:https://www.cnblogs.com/chaogehahaha/p/15449856.html