get the maximum value of a column

(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,

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326803401&siteId=291194637