Weld logo
SQL TUTORIAL • LESSON 13, Aggregating Data

Introduction to data aggregation

In In the ‘Creating columns’ section of the tutorial, you went from simply selecting existing data in your data set to creating new columns in your table. In this section, you’ll move on to rows.

In SQL, each row represents a unique observation in your data set. So, completely new rows are only created at your data source and added to the raw data. To create new rows in your tables that were not there before, you can aggregate the existing rows together in meaningful ways. Typical use cases for this would be to count how many customers you have (possibly in given periods), summarize how much you’ve sold, or find the average size of the orders in your business.

Next up

Using COUNT, SUM, AVG, MIN, and MAX

Go to lesson
© 2024 Weld. All rights reserved.