How to count all unique records in the SQL table?
Ask by Ashutosh Patel
Updated 22 Mar 2023
We can count all unique records in a table using the DISTINCT keyword in conjunction with the COUNT() aggregate function.
The DISTINCT keyword in a query retrieves different and non-repeating values.
The COUNT() function returns the number of rows selected by a query.