Arrange the SQL query in a sequence for "Selecting names of all employees who are getting bonus in the descending order of salary". Assume the table structure as :
Table- 'EMPLOYEES'
Structure: (EMPNO, NAME, SALARY, BONUS)
(A) FROM EMPLOYEES
(B) SELECT NAME
(C) ORDER BY SALARY DESC
(D) WHERE BONUS IS NOT NULL
Arrange the SQL query in a sequence for "Selecting names of all employees who are getting bonus in the descending order of salary". Assume the table structure as :
Table- 'EMPLOYEES'
Structure: (EMPNO, NAME, SALARY, BONUS)
(A) FROM EMPLOYEES
(B) SELECT NAME
(C) ORDER BY SALARY DESC
(D) WHERE BONUS IS NOT NULL
Solution
✅ Correct Option: 3
(B) SELECT NAME
(A) FROM EMPLOYEES
(D) WHERE BONUS IS NOT NULL
(C) ORDER BY SALARY DESC
SQL clauses must appear in the fixed order SELECT, FROM, WHERE, ORDER BY. WHERE filters rows before they are sorted, so ORDER BY always comes last.
Related questions:
2025: 20 May Shift 1
2025: 13 May Shift 2