This statement is erroneous because
A. Avg(salary) should not be selected
B. Dept_id should not be used in group by clause
C. Misplaced group by clause
D. Group by clause is not valid in this query
Answer:A
This statement is erroneous because
A. Avg(salary) should not be selected B. Dept_id should not be used in group by clause C. Misplaced group by clause D. Group by clause is not valid in this query
Explanation:Any attribute that is not present in the group by clause must appear only inside an aggregate function if it appears in the select clause, otherwise the query is treated as erroneous. 2. SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.