COUNT

Returns the number of rows that match a specified criteria.

Syntax

sql
COUNT(*) | COUNT(column) | COUNT(DISTINCT column)

Example

sql
SELECT COUNT(*) AS total FROM users;
SELECT COUNT(DISTINCT country) FROM users;