I have a table
id mid userid remarks 1 2 8 7 2 2 8 6 3 2 8
Select Id,mid,userid,remarks from sample Where id<(select max(Id) from sample) order by id desc limit 1
Or
Select Id,mid,userid,remarks from sample order by id desc limit 1 offset 1