YouTube magic that brings views, likes and suibscribers
Get Free YouTube Subscribers, Views and Likes

SQL Group By: An Explanation and How To Use It

Follow
Database Star

 Get my free SQL Cheat Sheets: https://www.databasestar.com/getsql...
 Learn and become confident in SQL: https://databasestar.mykajabi.com/sql...

The SQL GROUP BY keyword is a powerful feature that lets you summarise data from your query into groups.

This can be helpful to see the number of employees in a department, or the total value of sales per month, and much more. Any time you need "something PER something else", it's often done with an SQL Group By.

In this video, you'll learn what Group By is, a stepbystep process on how to write one, what happens if you don't include Group By, and some examples.

Timestamps:
00:00 Start
00:09 What is Group By?
00:30 Sample table
00:49 First query
01:34 Group By question
01:46 Start a Group By query
02:37 Add an Order By
03:04 Can we exclude Group By?
03:59 Using another aggregate function

posted by wynad2g