![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HIVE
�小谜�
这个作者很懒,什么都没留下…
展开
-
HIVE-SQL:抓取出日期中的连续日期、连续天数
select min(rq) as start2 -- 起始日期,max(rq) as end2 -- 结束日期,max(id1)-min(id1)+1 as dayy -- 连续天数,dif -- 分组from ( select (t1.id1+t2.id2) as dif ,t1.rq ,t1.id1 ,t2.id2 from ( ...原创 2019-11-05 17:31:42 · 722 阅读 · 0 评论 -
HIVE-SQL:同时求7天内、6天内、5天内最大值
此语句hive能执行,但impala不行。select c,b,max(a) over(partition by c ORDER BY b ROWS BETWEEN 4 PRECEDING AND CURRENT ROW) as a1,max(a) over(partition by c ORDER BY b ROWS BETWEEN 5 PRECEDING AND CURRENT R...原创 2019-11-05 17:27:05 · 2067 阅读 · 0 评论