取连续出现3次的数字,可考虑: select distinct NUM from ( select NUM, rn_Id - rn_NUM as rn_ID_gp, count(1) as cnt from ( select NUM, row_number() over(order by Id) as rn_Id, row_number() over(partition by NUM order by Id) as rn_NUM from NUM_table ) a group by NUM, rn_Id - rn_NUM ) t where cnt >= 3

相关推荐

勤奋努力的椰子这就开摆:美团骑手在美团工作没毛病
投递美团等公司10个岗位
点赞 评论 收藏
分享
点赞 评论 收藏
分享
牛客网
牛客企业服务