select  部门,count(*)  as  总人数,(select count(*) from worker where sex='男') as 男,(select count(*) from worker where sex='女') as 女  from  worker  group  by  部门