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;Returns the number of rows that match a specified criteria.
COUNT(*) | COUNT(column) | COUNT(DISTINCT column)SELECT COUNT(*) AS total FROM users;
SELECT COUNT(DISTINCT country) FROM users;