CBSE Class 12 Computer Science Question 56 of 91

Grouping Records, Joins in SQL — Question 12

Back to all questions
12
Question

Question 12

With GROUP BY, the select-list of the SELECT statement can only take the group-field and/or aggregate function.

Answer

True

Reason — When using the GROUP BY clause in SQL, the select-list of the SELECT statement can only include the grouping columns (group-fields) and/or aggregate functions. MySQL would not produce any error even if we include a non-group field in the select-list. However, it will return the value from first record of the group for that non-group field.