select rn,a,b,c
  from (select ROW_NUMBER() OVER(PARTITION BY a ORDER BY b DESC) rn,a,b,c
              from table)
 where rn = 1

执行代码后:

此思路可以运用到各种分组并按分组排序后获取第一条数据,即取分组最小记录或最大记录的情况