Q&A
Ask and answer questions to make information more available to wider audiences.
Juan Linkenhoker @juanlinkenhoker   19, Jul 2023 12:00 AM
COUNT() aggregate function
What is the use of COUNT() aggregate function?
answers 1
 
Answer 1
Ethan Barbrow @ethanbarbrow   09, Aug 2023 03:22 PM
MariaDB COUNT() aggregate function is used to return the count of an expression.

The COUNT () Function counts only NOT NULL values.

COUNT (*) counts the total number of rows in a table.

COUNT () would return 0 if there were no matching rows.

Syntax:

SELECT COUNT(aggregate_expression)      
FROM tables      
[WHERE conditions];