Examine the description of the EMPLOYEES table:
You write this failing statement:
Which clause causes the error?
Examine the description of the EMPLOYEES table:
You write this failing statement:
Which clause causes the error?
The GROUP BY clause in SQL statements cannot use column aliases that are defined in the SELECT list. In the provided query, 'department_id' is an alias for 'dept_no' defined in the SELECT clause. Therefore, using 'department_id' in the GROUP BY clause causes the error. Instead, 'dept_no' should be used directly in the GROUP BY clause.
B GROUP BY cannot use alias
B is correct