For nth maximum select column_name from table_name where condition order by column_name desc limit N-1,1;