📅  最后修改于: 2022-03-11 15:05:32.804000             🧑  作者: Mango
select d.*
from (select d.*,
row_number() over (order by coursecode, newid) as seqnum,
count(*) over () as cnt
from degree d
) d
where seqnum % (cnt / 500) = 1;