Learn
Aggregate Functions
Introduction

We’ve learned how to write queries to retrieve information from the database. Now, we are going to learn how to perform calculations using SQL.

Calculations performed on multiple rows of a table are called aggregates.

In this lesson, we have given you a table named fake_apps which is made up of fake mobile applications data.

Here is a quick preview of some important aggregates that we will cover in the next five exercises:

  • COUNT(): count the number of rows
  • SUM(): the sum of the values in a column
  • MAX()/MIN(): the largest/smallest value
  • AVG(): the average of the values in a column
  • ROUND(): round the values in the column

Let’s get started!

Instructions

1.

Before getting started, take a look at the data in the fake_apps table.

In the code editor, type the following:

SELECT * FROM fake_apps;

What are the column names?

Folder Icon

Take this course for free

Already have an account?