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.
Consider the following statements about the aim of PM GatiShakti Scheme:
(1)Â To have two new defence corridors.
(2)Â Extending 4G con...
What is the primary focus of the Dubai Gaming Visa introduced by the Crown Prince of Dubai?
According to the new UNAIDS report "The Urgency of Now: AIDS at a Crossroads," what is one of the critical steps needed to end the AIDS pandemic by 2030?
44th World Chess Olympiad 2022, which is to be hosted by India, earlier was to be hosted by?
________ is aiming to invest 165 billion rupees in clean energy projects to meet its 2040 net zero carbon emissions goal.
As part of the Centre’s infrastructure push, the Union Cabinet has approved seven proposals by the Ministry of Railways to expand the rail network in ...
Which of the following statements is true about the Jan Vishwas (Amendment of Provisions) Bill, 2023 recently passed in Lok Sabha?
Who has been selected as the new Chief Technologist of NASA?
The first service of the theme-based Bharat Gaurav Train started its journey from Coimbatore North to which place?
Which Indian state became the top producer and exporter of processed potatoes in 2024–25?Â