Write a query to get the second highest salary of an employee(DB testing)

AnswerBot
1y

Query to get the second highest salary of an employee in DB testing.

  • Use the SELECT statement to retrieve the salary column from the employee table.

  • Order the results in descending order using the ORDER...read more

NILESH BHANUDAS MUDGADE
3y

select * from (select employee11.*, dense_rank() over (order by esal desc)  as ranking  from employee11 ) where ranking=2

 

Naga Pradeep
3y

select * from Employee_table where salary = (select min(salary) from Empoyee_table where salary in (select distinct top 2 from Employee_Table order by salary desc))

 

Anonymous
4y
I could not answer this question.i have only basic query knowledge in sql.
Add answer anonymously...
Mirabel Technologies QA Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter