联合都不起作用

siv3szwd  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(413)

我试图对配置单元中的两个内部查询的计数求和,但这会引发错误“not yet supported place for udaf count”。有什么建议就好了

SELECT sum(count(distinct session),count(distinct session1)) FROM (
select concat(high, low, visit_num) as session from tab1
union all
select concat(high, low, visit_num) as session1 from tab2)t;
webghufk

webghufk1#

SELECT sum(cnt) 
FROM 
(
  select count(distinct concat(high, low, visit_num)) as cnt from tab1
  union all
  select count(distinct concat(high, low, visit_num)) as cnt from tab2
) t

相关问题