sql按字段值进行统计

用group byrn如有个student表里有性别sex来统计rnselect sex,count(*) from student group by sex;