按每20条分组查询

select (row_number()over(order by dabh)-1)/20[groupby] from v_payroll
原文地址:https://www.cnblogs.com/hllive/p/7253037.html