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.
Which of the statement is/are correct about the three controversial farm laws passed by the parliament in Sept ember 2020?
(A) In January 2021, t...
What is the Bihar Literacy Rate at present?
India’s rank in Global Cybersecurity Index for the year 2020?
Which of the following is used to chemically test starch?
Shri Domar Singh Kunvar from Chhattisgarh was honoured with _______ in the year 2023 for his contribution to 'Natya Nach'.
Which award did Payal Kapadia win at the Cannes Film Festival for 'All We Imagine as Light'?
Determine the order of the following national parks located in the state of Uttarakhand from west to east and choose the correct option -
Which Union Territory had minimum literacy rate as per 2011 Census?
Consider the following statements:
1.The Hadith literature is a record of the sayings and deeds of the Prophet Muhammad.
2.Sufism is a mys...
The height of the Dancing Girl figurine of Indus Valley Civilization is about _________.