表里的数据汇总
有一个表如下:

我想让Partype这一列汇总得到像下面的临时表:

请问题如何实现呀!!
------解决方案--------------------
看你的具体需求:
select Partype,count(*) as 总数
from 表
group by Partype
或者:
select Partype,sum(partamount) as 总数
from 表
group by Partype
------解决方案--------------------直接按照partype分类汇总可以么?
select partype,count(*) 总数 from 表 group by partype