Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Wrangling with SQL

You're reading from  Data Wrangling with SQL

Product type Book
Published in Jul 2023
Publisher Packt
ISBN-13 9781837630028
Pages 350 pages
Edition 1st Edition
Languages
Authors (2):
Raghav Kandarpa Raghav Kandarpa
Profile icon Raghav Kandarpa
Shivangi Saxena Shivangi Saxena
Profile icon Shivangi Saxena
View More author details

Table of Contents (21) Chapters

Preface 1. Part 1:Data Wrangling Introduction
2. Chapter 1: Database Introduction 3. Chapter 2: Data Profiling and Preparation before Data Wrangling 4. Part 2:Data Wrangling Techniques Using SQL
5. Chapter 3: Data Wrangling on String Data Types 6. Chapter 4: Data Wrangling on the DATE Data Type 7. Chapter 5: Handling NULL Values 8. Chapter 6: Pivoting Data Using SQL 9. Part 3:SQL Subqueries, Aggregate And Window Functions
10. Chapter 7: Subqueries and CTEs 11. Chapter 8: Aggregate Functions 12. Chapter 9: SQL Window Functions 13. Part 4:Optimizing Query Performance
14. Chapter 10: Optimizing Query Performance 15. Part 5:Data Science And Wrangling
16. Chapter 11: Descriptive Statistics with SQL 17. Chapter 12: Time Series with SQL 18. Chapter 13: Outlier Detection 19. Index 20. Other Books You May Enjoy

Summary

In this chapter, we learned how aggregate functions are used to perform calculations on a set of values and return a single value. The different aggregate functions include the following:

  • COUNT(): Returns the number of rows in a specified column
  • SUM(): Returns the sum of the values in a specified column
  • AVG(): Returns the average value of the values in a specified column
  • MIN(): Returns the minimum value in a specified column
  • MAX(): Returns the maximum value in a specified column

These functions are often used in conjunction with a GROUP BY clause, which groups the rows in a table based on one or more specified columns. By applying aggregate functions to grouped data, you can gain insights into the characteristics of the data and make informed decisions.

For example, you can use COUNT() and AVG() to find out the number of products sold and the average price of products in a store, or you can use SUM() to calculate the total sales of a store...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}