Business analysis glossary
GROUP BY
What it is
GROUP BY is the SQL clause that groups rows sharing a value, so aggregate functions such as COUNT, SUM and AVG can be calculated for each group instead of for the whole table. Typical aggregate functions are COUNT, SUM, AVG, MIN and MAX, and each returns one value per group.
Why it matters
Business questions are often about categories: sales per region, tickets per week. GROUP BY turns detailed rows into the summarised figures people use in reports. Used with HAVING it can also filter groups, for example to find only regions with more than 100 orders.
Example
SELECT region, COUNT(*) FROM orders GROUP BY region; shows how many orders each Lumen Retail region received. Adding a WHERE filter first restricts the count to a chosen month. The result has one row per region, which is the shape a bar chart or summary table needs to be useful.