Reputation: 4158
I am trying to sum up the counts from 2 inner queries in Hive, but this throws the error "Not yet supported place for UDAF count". Any suggestions would be great
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;
Upvotes: 0
Views: 1448
Reputation: 204904
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
Upvotes: 3