分组 group by 用于对指定列进行分组

select partid,count(partid) from person group by partid;