Hibernate / SQL
What is the simplest way to find the second largest value using SQL?
To find the second largest, Use the max aggregate function to find the largest and filter the largest value and find the maximum value again that yields the second largest.
SELECT MAX( column) FROM table WHERE column< ( SELECT MAX( column) FROM table )
More Related questions...