需求:
每条记录后添加一个字段,内容为该记录所在类的类中记录数
select*from table1,
(select class,count(*)
from table1
group by class) as T2
where table1.class=T2.class