- 博客(4)
- 收藏
- 关注
原创 Over:窗口函数(滑动聚合)
遇到的问题: with testdata as ( select 1 as id, 100 as val union all select 1 as id, 102 as val union all select 2 as id, 103 as val ) select id,sum(id) over(order by id asc) from testdata id sum(CAST(id AS BIGINT)) OVER (ORDER BY id ASC NULLS
2022-02-14 15:49:48 118
原创 hive sql复杂场景-2
输入表:描述了每个id存在的时段 id startdate enddate 4172752725 2017-07-31 2017-08-02 4172778959 2017-08-01 2017-08-02 4172779968 2017-07-31 2017-08-01 4172781986 2017-08-09 2017-08-10 4172945444 2017-08-03 2017-08-04 4173
2021-11-29 20:15:09 1458
原创 hive sql复杂场景-1
startdate version 2021-02-28 12 2021-03-27 11 2021-03-29 10 2021-10-28 12 2021-11-26 11 2021-11-27 1 2021-11-28 10 2021-12-26 9 需求: 如果两个startdate相差小于30天,那么认为这两个startdate对应的数据在一个集合中;如果第三条数据的startdate与这个集合中任意一条数
2021-11-29 19:33:26 1527
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人