Skip to content

Glossary: SQL Basics

COUNT

Also written: COUNT(*), COUNT(column), COUNT(DISTINCT)

An aggregate function. `COUNT(*)` counts rows, `COUNT(column)` counts rows where that column isn't NULL, and `COUNT(DISTINCT column)` counts different values.

Where the book teaches it

Related terms

Aggregate functionDISTINCTNULL