Introduction
Function COUNT
Function AVG
Functions SUM, MAX, MIN
Revision

Instruction

Nice. Now that you know the tables, let's get down to work.

We'll start off with the function you already know: COUNT(*), which is used to count all the rows in the result set. Just like this:

SELECT COUNT(*)
FROM translator
WHERE start_date > '2016-01-01';

The above query will provide the number of translators who started collaborating with the translation agency on January 1, 2016 or later.

Exercise

Now's your turn. Count the number of all the projects for the client with id 1.

Stuck? Here's a hint!

Use a WHERE clause to pick the id.

Console

Code editor

Result

TableConsole