How to select second last row from table?
You can use this:

SELECT *
FROM table_name
ORDER BY column_name DESC
LIMIT n - 1, 1


The query just returns the first row after n-1 row(s)

For example, if you want to get the second most expensive product (n = 2) in the products table, you just use the following query:

SELECT productCode, productName, buyPrice
FROM products 
ORDER BY buyPrice desc 
LIMIT 1, 1


Try this. Could test here and it's ok.

Found this site helpfull