窗口函数增加新的排序一列 之后case when select a.user_id,a.active_dt,a.active_days from (select *, (case when active_day<=3 then active_day else 1 end)active_days from( select user_id, active_dt, row_number() over (partition by user_id order by active_dt )as active_day from table1) t)a ;
点赞 评论

相关推荐

06-03 15:32
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务