返回顶部

收藏

hive union all嵌套使用

更多
select id from (
    select a.id from 
    (
    select 1 as id from dua
    union all 
    select 2 as id from dua
    ) a join 
    (select 4 as id from dua) f on a.id =f.id
union all 
    select b.id from 
    (
    select 1 as id from dua
    union all 
    select 2 as id from dua
    ) b join 
    (select 3 as id from dua) e on b.id =e.id
) c

标签:sql

收藏

0人收藏

支持

0

反对

0

发表评论