参阅(有AutoID字段):
use northwind
select count(*),f
from
(
select *,(select count(*) from products where productid <= a.productid) / 6 as f
from products a
) T
group by f
use northwind
select count(*),f
from
(
select *,(select count(*) from products where productid <= a.productid) / 6 as f
from products a
) T
group by f
use northwind
select count(*),f
from
(
select *,(select count(*) from products where productid <= a.productid) / 6 as f
from products a
) T