设计图如下
根据姓名和类别分组count
select employee,attendance,count(1) as nums from a group by employee,attendance
然后类别字段横向扩展,单元格做个公式形态
按员工分组统计啊
select count(1) from xxx GROUP BY 员工ID,考勤类别
~~~