Multiple choice technology databases

We can use group by clause with:

  1. Non aggregate functions only

  2. Aggregate functions only

  3. Both 1 & 2

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

GROUP BY is used with aggregate functions like COUNT, SUM, AVG, MAX, MIN to perform calculations on groups of rows. The columns in GROUP BY determine how rows are grouped, and aggregates compute summary values for each group. Non-aggregate columns in the SELECT must appear in the GROUP BY clause itself.