按kdg分组,查询每组中product(char类型数值)的最大值: select kdg,product from (select * from class order by product+0 desc) a group by a.kdg;