select second highest number sql code example
Example: how to get employee having maximum experience in mysql
select max(salary), dept_id from employee where salary not in(select max(salary) from employee) group by dept_id;
select max(salary), dept_id from employee where salary not in(select max(salary) from employee) group by dept_id;