suggest that if your above SQL statement can query the result.
maybe you can just skip the “order by” and simply just
select * from (/* your SQL statement without "order by"*/) a order by a.message_id desc
sorry that as it is difficult to see your screen capture and help you to resolve the SQL script.
3
solved mysql , max ,groub by [closed]