Introduction
Function AVG
20. AVG and NULLs only
Functions SUM, MAX, MIN
Revision

Instruction

As you can see, NULL was not counted at all. Okay then, if NULL values are ignored when calculating the average, what could happen when ALL of them were NULLs? Let's find out.

Exercise

Let's calculate the average number of words in all the projects done by translator with id = 5 again.

This time, though, exclude project_id = 13 from the rows so that the only two projects left are the ones with a NULL value.

Stuck? Here's a hint!

Use the inequality sign != to exclude project_id 13. Use AND to join two conditions.

Console

Code editor

Result

TableConsole