select A.id,B.序号,B.姓名,A.学历 from 
(select ID,max(学历) as 学历 from table1 group by id) A
inner join 
(select ID,max(序号) as 序号,max(姓名) as 姓名 from table1 group by id) B
on A.id=B.id