Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Function COUNT
Function AVG
Functions SUM, MAX, MIN
Review

Instruction

That's it! You may also remember that we can use COUNT with a column name:

SELECT COUNT(name)
FROM client;

What's the difference between COUNT(*) and COUNT(name) in this case? COUNT(*) will count all the rows in the table, but COUNT(name) will skip those rows where name is NULL.

Exercise

Let's see how this works in practice.

Count all the rows in the table project (name the column all_projects), then count those rows where price is not NULL (name the column projects_with_price).

Stuck? Here's a hint!

Use COUNT(*) and COUNT(price), as appropriate.