Relational database
shape
GROUP BY
clause in MySQL is used to group rows that have the same values in specified columns into summary rows, often used with aggregate functions like COUNT()
, SUM()
, AVG()
, MIN()
, and MAX()
to perform calculations on each group. Essentially, it allows you to aggregate data across multiple rows and summarize it into a smaller set of results.