设表中bj为班级字段
**bjrs 表为班级人数
**'名单'+_bj为班级名单
select distinct bj ,count(*) 人数 from xsda.dbf group by bj into dbf bjrs
for i=1 to recount('bjrs')
select bjrs
GO i
_bj=ALLTRIM(bj)
_wjm='名单'+_bj
SELECT * FROM xsda INTO dbf &_wjm WHERE ALLTRIM(bj)==_bj
ENDFOR