Pages

Wednesday, 7 June 2023

Find second max value in the table (nth max value)

--Second maximum column value

SELECT *

FROM customers

ORDER BY age DESC, first_name ASC

LIMIT 1,1; -- 1 - number of row to omit, 1 - no of records to show


No comments:

Post a Comment

Code Review

 SOLID Principles S – Single Responsibility Principle There should never be more than one reason for a class to change. O – Open-Closed Prin...