Master the SQL SELECT statement part 06: Aggregate Functions, GROUP BY and HAVING clauses

Опубликовано: 07 Ноябрь 2024
на канале: Michael Fudge
18,331
580

This video is part of a multi-part series on mastering the SQL SELECT statement. The SELECT statement, the most often used SQL command, is easy to learn yet difficult to master. Follow along with me and level up your database query super powers!

This video covers the Aggregate Functions, GROUP BY, and HAVING clauses, specifically
Counting rows, values in columns, and unique values in columns
Getting sums, minimum, maximum, and averages.
NULL handling of the aggregate functions.
The purpose of GROUP BY
Understanding why columns in the projection (SELECT line) must be in the GROUP BY when an aggregate it used.
Using the HAVING clause to filter rows after the GROUP BY operation.
Differences between HAVING and WHERE

The SQL code is available here: https://github.com/mafudge/learn-data...

If you need to setup your own database environment, check out learn-databases! The easy way to get going and follow along with these videos.    • Learn Databases Walkthrough  

This video is part of the textbook Applied Database Management https://applieddb.com

Here's the entire playlist:    • Applied Database Management with SQL