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

 

posted @ 2018-08-10 00:48  0xcafedaddy  阅读(1951)  评论(0编辑  收藏  举报