Question
Which of the following query will return the
third-highest salary from an Employee table in SQL?Solution
To get the third-highest salary, the query SELECT salary FROM Employee ORDER BY salary DESC LIMIT 1 OFFSET 2; fetches the salary value after skipping the top two highest salaries. The outer query ensures that we only get the third-highest salary. Why Other Options are Wrong: a) Incorrect usage of LIMIT; it should be OFFSET 2 instead of LIMIT 2, 1. b) This would return multiple rows or result in an error. c) DISTINCT is unnecessary and could result in wrong data if multiple employees have the same salary. e) This query would return the first three salaries in ascending order, not the third-highest.
Who became the first woman Director General of Police (DGP) of Meghalaya in 2024?
Consider the following statements:
1. 'Due process of Law' provides for judicial scrutiny against arbitrary action of executive only.
2. T...
Who inaugurated the two Indian pavilions at the 76th NAFSA 2024 Conference & Expo?
Bernard Hill, recently in the news, was renowned for his contributions to which industry?
- Which benefit will Indian Railways introduce in February 2025 to lower coal transportation costs in RSR mode?
____ has announced a five-year business partnership with ServiceNow to invest in and bring new offerings to market that will empower clients to drive ...
Consider the following statements about the Pradhan Mantri Awaas Yojana- urban (PMAY-U):
I. It was Implement...
What is the name of the third Stealth Destroyer of Project 15B Class Guided Missile Destroyer recently delivered to the Indian Navy by Mazagon Dock Ship...
Which of the following statement/statements is/are INCORRECT regarding the India-Qatar LNG deal renewal?
1. India signed a USD 78 billion deal to...
Who is called the 'Chanakya of MP'?