In MySQL, which query correctly returns the salary appearing in the nth row…
PYQ IBPS SO CRP SPL-XIV (2024)
In MySQL, which query correctly returns the salary appearing in the nth row after sorting all salaries in descending order from the Employees table?
- A.
SELECT SALARY FROM Employees ORDER BY SALARY DESC LIMIT n, 1; - B.
SELECT SALARY FROM Employees ORDER BY SALARY ASC LIMIT n-1, 1; - C.
SELECT SALARY FROM Employees ORDER BY SALARY DESC LIMIT 1, n-1; - D.
SELECT SALARY FROM Employees ORDER BY SALARY DESC LIMIT n-1, 1; - E.
SELECT MAX(SALARY) FROM Employees WHERE SALARY < n;
Attempted by 62 students.
Sign up free to check your answer
Sign up freeLoading lesson…

