select id,姓名, avg(工资) as '工资'from tablenamegroup by id, 姓名order by id
select ID,min(姓名),sum(工资)/12 from 表 group by ID