Sql根据某一字段排序并取出第一个值
根据字段1排rownum ,根据字段2排大小select * from (select *, row_number() over ( partition by 字段1 order by 字段2 desc ) as rownum from 表) infowhere info.rownum = 1