摘要:
select[部门名称] = c.name,[工号] = b.code,[姓名] = b.cnname,[到职日期] = b.jobdate,[离职日期] = b.lastworkdate,[大过] = sum(case when d.name='大过' then a.times else 0 end ),[小过] = sum(case when d.name='小过' then 1 else 0 end ) ,[警告] = sum(case when d.name='警告' then 1 else 0 end ) ,[大功] = sum(cas 阅读全文