[freeCodeCamp] SQL Group By Tutorial: Count, Sum, Average, and Having Clauses Explained

September 24, 2020

For years GROUP BY in SQL always confused me. It's a weird concept. You can't really see the grouping happening—you just act on the grouped result.

With enough practice, you can learn how to solve a variety of problems and segment your data to produce useful analytics and insights by using GROUP BY.

I've written a tutorial on GROUP BY on freeCodeCamp's Developer News.

In this article I show how the GROUP BY clause works, the various aggregations you can perform on the grouped result set (like COUNT, SUM, and AVG), and how to filter the grouped result using the HAVING clause.

I hope you enjoy it and again thanks for reading!