Skip to Content
Learn
Aggregate Functions
Average

SQL uses the AVG() function to quickly calculate the average value of a particular column.

The statement below returns the average number of downloads for an app in our database:

SELECT AVG(downloads) FROM fake_apps;

The AVG() function works by taking a column name as an argument and returns the average value for that column.

Instructions

1.

Calculate the average number of downloads for all the apps in the table.

In the code editor, type:

SELECT AVG(downloads) FROM fake_apps;
2.

Remove the previous query.

Write a new query that calculates the average price for all the apps in the table.

Folder Icon

Take this course for free

Already have an account?