Introduction
Function AVG
17. Function AVG
Functions SUM, MAX, MIN
Revision

Instruction

Ok, time to move on. Another function we're going to take a closer look at is AVG, which computes the average value. Let's start with AVG(column):

SELECT AVG(price)
FROM project;

The above query will find the average price for all projects.

Exercise

Find the average number of words from all projects with Spanish (ES) as the target language.

Stuck? Here's a hint!

Use a WHERE clause to pick the lang_to.

Console

Code editor

Result

TableConsole