It appears that the values ββare strings and select the maximum row. You must first transfer them to numbers if you want them to be sorted numerically. You can use CONVERT to do this:
SELECT MAX(CONVERT(id, SIGNED)) FROM table
You can also use CAST :
SELECT MAX(CAST(id AS SIGNED)) FROM table
They do almost the same thing, except that it CONVERThas some additional options if you need them.