Suggest an editImprove this articleRefine the answer for “What does the COUNT() aggregate function do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)`COUNT()` is an aggregate function that **counts the number of rows** in a dataset; `COUNT(*)` counts all rows (even ones with `NULL`), `COUNT(column_name)` counts only rows where the column isn't `NULL`, and `COUNT(DISTINCT column_name)` counts unique non-empty values. **Key point:** the example `SELECT COUNT(*) FROM employees` returns the total number of employees.Shown above the full answer for quick recall.Answer (EN)Image`COUNT()` is an aggregate function that **counts the number of rows** in a dataset. It can behave differently depending on its argument: - `COUNT(*)` counts **all rows**, including ones with `NULL`; - `COUNT(column_name)` counts **only rows where the column isn't** `NULL`; - `COUNT(DISTINCT column_name)` counts **unique non-empty values**. ### Example ```sql SELECT COUNT(*) FROM employees; ``` Returns the total number of employees.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.