Hive不等值连接

select * from (
select t1.instalment_id as r_id , t2.instalment_id as p_id
from
(select instalment_id from r_i ) t1
left join
(select instalment_id from p_i ) t2
on t1.instalment_id = t2.instalment_id
) c where c.p_id is null

create table ins as
select t1.instalment_id p,t2.instalment_id r from 1706_payin t1 left join 1706_rec t2 on t1.instalment_id = t2.instalment_id

select * from ins where r is null

猜你喜欢

转载自www.cnblogs.com/0xcafedaddy/p/9452665.html
今日推荐