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?

  1. A.
    SELECT SALARY
    FROM Employees
    ORDER BY SALARY DESC
    LIMIT n, 1;
  2. B.
    SELECT SALARY
    FROM Employees
    ORDER BY SALARY ASC
    LIMIT n-1, 1;
  3. C.
    SELECT SALARY
    FROM Employees
    ORDER BY SALARY DESC
    LIMIT 1, n-1;
  4. D.
    SELECT SALARY
    FROM Employees
    ORDER BY SALARY DESC
    LIMIT n-1, 1;
  5. E.
    SELECT MAX(SALARY)
    FROM Employees
    WHERE SALARY < n;

Attempted by 62 students.

Sign up free to check your answer

Sign up free

Explore the full course: Ibps So It Prelims

Loading lesson…