hive union all嵌套使用
程序员文章站
2022-06-01 14:23:56
...
不多说了,直接上代码 无 select id from (select a.id from (select 1 as id from duaunion all select 2 as id from dua) a join (select 4 as id from dua) f on a.id =f.idunion all select b.id from (select 1 as id from duaunion all select 2 as id
不多说了,直接上代码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
select id from ( select a.id from ( select 1 as id from dua union all select 2 as id from dua union all select 5 as id from dua union all select 6 as id from dua ) a join ( select 4 as id from dua union all select 3 as id from dua ) b on a.id =b.id ) c