75.9k views
4 votes
Must the WHERE clause always appear before the GROUP BY clause in an SQL SELECT statement?

a) Yes, it's a strict rule.
b) No, the order doesn't matter.
c) It depends on the database system.
d) The WHERE clause is not used with GROUP BY

1 Answer

2 votes

Final answer:

The WHERE clause can appear before or after the GROUP BY clause in an SQL SELECT statement.

Step-by-step explanation:

No, the order doesn't matter. The WHERE clause can appear before or after the GROUP BY clause in an SQL SELECT statement. The WHERE clause is used to filter the rows before they are grouped, while the GROUP BY clause is used to group the rows based on specified columns.

User Topcbl
by
8.6k points

No related questions found