取某一列的最大值

(select *
                           from (select row_number() over(partition by productid order by commentsequence) rn,
                                        t.*
                                   from tscm_productgeneral11 t
                                  where t.generalinfocode = 1005)
                          where rn = 1) t2,

猜你喜欢

转载自zhang80jie.iteye.com/blog/2307786
今日推荐