Multiple choice technology databases

What will be the correct order of the below mentioned clauses in a SQL if select part of the query contains on group function and there is one filter condition. I.Where II.GROUP BY III.HAVING IV.ORDER BY

  1. I,III,II,IV

  2. I,II,III,IV

  3. II,IV,III,I

  4. II,I,IV,III

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The standard execution and syntax order of clauses in a SQL SELECT statement is WHERE (I), followed by GROUP BY (II), then HAVING (III), and finally ORDER BY (IV). This ensures rows are filtered, grouped, groups are filtered, and then results are sorted.