id    name   code
1    1001    1
2    1001    2
3    1003    3
4    1003    4
查询结果是
2    1001   2
4    1003   4要求是id是最大值code是最大值的不同name都显示