我正在运行以下hql:
hive>select period,count(*) from
(select case when hour(a.first_time)>=21 and hour(a.first_time)<24 then'21-24'
when hour(a.first_time)>=12 and hour(a.first_time)<21 then'12-21'
else '0-12'
end as period
from longyuan_web.tv_log as a ) p1
group by period;
但是什么也没回来,有人能告诉我为什么吗?
我期望输出如下:
0-12 34000
12-21 12000
21-24 32000
非常感谢你!
暂无答案!
目前还没有任何答案,快来回答吧!