MySQL数据库统计出勤缺勤次数

求一下代码

img
最后输出结果
pno 出勤 缺勤
xxx 1 0
xxx 0 4

select pno,(select count() from 表名 where pno=a.pno and acondition='出勤') 出勤, (select count() from 表名 where pno=a.pno and acondition='缺勤') 缺勤 from 表名 a group by pno