Cellwise · SQL track

Counting carefully

Distinct counts, NULLs in counts, and lists in one cell.

COUNT(*) counts rows. COUNT(column) counts rows where that column isn’t NULL. COUNT(DISTINCT column) counts different values.

GROUP_CONCAT joins a group’s values into one piece of text, like TEXTJOIN in a spreadsheet. You can choose the separator and the order.

What you’ll do

Start the lesson, free