SQL COUNT - SQL Tutorial
The SQL COUNT aggregate function is used to count the number of rows in a database table.
The SQL COUNT syntax is simple and looks like this:
If we want to count the number of customers in our Customers table, we will use the following SQL COUNT statement:
SELECT COUNT(LastName) AS NumberOfCustomers
The result of this SQL COUNT query will be: