MISSION 254

Group Summary Statistics

In our group summary statistics SQL lesson, learn how to calculate summary statistics in SQL across groups. Calculating and grouping statistics of a dataset is an important skill to have because it allows you to do a more robust exploration of your data. 

Knowing how to do this is essential to explore the statistics in a data set beyond a set of aggregate functions. Building on the previous lesson, you'll continue your journey and gradually grow your SQL skills, which are critical for any data analysis or data science job.

In this lesson, you will learn how to compute group-level summary statistics in a database table as well as the difference between the `WHERE` clause and the `HAVING` clause. As you start this lesson, you will learn to calculate group-level summary statistics using the `GROUP BY` clause. Then you will learn how to utilize the `HAVING` clause to filter your data after using aggregate functions.

While learning about each of the above clauses, you will be working with the same data set as in previous lessons: the 2010-2012 data about college grads. This data set contains information on job outcome statistics based on college majors.

Objectives

  • Learn how to compute group level summary statistics in a database table.
  • Learn how to query virtual colums within a group.

Mission Outline

1. Introduction
2. Calculating Group-Level Summary Statistics
3. Practice: Using GROUP BY
4. Querying Virtual Columns With the HAVING Statement
5. Rounding Results With the ROUND() Function
6. Nesting functions
7. Casting
8. Next Steps
9. Takeaways

sql-fundamentals

Course Info:

Beginner

The median completion time for this course is 6.3 hours. View Details

This course requires a basic subscription and includes five missions and one guided project.  It is the 11th course in the Data Analyst in Python path and the Data Scientist in Python path.

START LEARNING FREE

Take a Look Inside