Appearance
Approach: Second max = max of salaries excluding the overall max (via NOT IN subquery).
Complexity: O(n) time with two scans (DB-dependent)
sql
select max(Salary) from Employee where Salary not in (select max(Salary) from Employee)