SELECT a.房改号, a.姓名, a.车间部门, a.职务, Format([收入年月],"yyyy/q") AS 季度, Sum(a.生产奖) AS 生产奖, Sum(a.应计资) AS 应计资, Sum(a.奖金) AS 奖金, Sum(a.收入合计) AS 收入合计, Round([收入合计]/3,2) AS 月均收入, a.班组, a.职务分组, a.岗位分组, a.行车相关工种, a.当月人员分类, a.机构分组
FROM 工资奖金表 AS a
GROUP BY a.房改号, a.姓名, a.车间部门, a.职务, Format([收入年月],"yyyy/q"), a.班组, a.职务分组, a.岗位分组, a.行车相关工种, a.当月人员分类, a.机构分组;
SELECT a.房改号, a.姓名, Last(a.车间部门) AS 车间部门, Last(a.职务) AS 职务, Format([收入年月],"yyyy/q") AS 季度, Sum(a.生产奖) AS 生产奖, Sum(a.应计资) AS 应计资, Sum(a.奖金) AS 奖金, Sum(a.收入合计) AS 收入合计, Round([收入合计]/3,2) AS 月均收入, Last(a.班组) AS 班组, Last(a.职务分组) AS 职务分组, Last(a.岗位分组) AS 岗位, Last(a.行车相关工种) AS 行车, Last(a.当月人员分类) AS 人员分类, Last(a.机构分组) AS 机构分组
FROM 工资奖金表 AS a
GROUP BY a.房改号, a.姓名, Format([收入年月],"yyyy/q");