hive 三表full join
·
select
coalesce(a.id,b.id,c.id) as id
,coalesce(a.num,0)
,coalesce(b.num,0)
,coalesce(c.num,0)
from table1 a
full join table2 b
on a.id=b.id
full join table3 c
on coalesce(a.id,b.id)=c.id

更多推荐
select
coalesce(a.id,b.id,c.id) as id
,coalesce(a.num,0)
,coalesce(b.num,0)
,coalesce(c.num,0)
from table1 a
full join table2 b
on a.id=b.id
full join table3 c
on coalesce(a.id,b.id)=c.id

更多推荐
所有评论(0)