Introduction
Function AVG
Functions SUM, MAX, MIN
27. SUM with NULLs only
Revision

Instruction

Good! Just like with AVG, SUM will return a NULL when all the values are NULL. Let's check it out.

Exercise

Remember the translator with id = 5 Adriana Fuentes? Let's go back there again. Sum all the words from all her projects except for project_id = 13 so that you only sum NULLs.

Stuck? Here's a hint!

Use a WHERE clause with two conditions joined by AND.

Console

Code editor

Result

TableConsole