Find highest salary from a given table
select max(salary) from table;
Find second highest salary from a given table
select max(salary) from table where salary not in(select max(salary) from table);
select max(salary) from table;
Find second highest salary from a given table
select max(salary) from table where salary not in(select max(salary) from table);