需要计算历史分区数据,即每个分区往前取时间最大值
row_number() over(partition by t.id order by t.created_date desc range between unbounded preceding and current row )
row_number 不能指定 时间范围排序吗
需要计算历史分区数据,即每个分区往前取时间最大值
row_number() over(partition by t.id order by t.created_date desc range between unbounded preceding and current row )
row_number 不能指定 时间范围排序吗
row_number 不是聚合函数,排序函数都不支持
sum ,max,等等都可以用 range between