SELECT user_id, active_dt, row_number() OVER(PARTITION BY active_days ORDER BY active_dt) active_days FROM ( SELECT user_id, active_dt,TO_DATE(active_dt,'YYYYMMDD') - row_number() OVER(order by active_dt) active_days FROM table1 )
点赞 评论

相关推荐

点赞 评论 收藏
分享
牛客网
牛客企业服务