- Home
- Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. SQL SELECT's GROUP BY clause is
Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. SQL SELECT's GROUP BY clause is used to divide the result in groups.
Reason. The GROUP BY clause combines all those records that have identical values in a particular field or in group by fields.
Answer
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
The GROUP BY clause combines all those records that have identical values in a particular field or a group of fields. This clause is utilised in SELECT statements to divide the result set into groups based on the values in the specified columns. Grouping can be done by a column name, or with aggregate functions in which case the aggregate produces a value for each group.