SQL Server Transact Basic to Expert - Using Count Aggregate function for Distinct Values

This blog shows how to use the Count funtion to get the count of the distinct values of a columns.

Example:

SELECT  COUNT(DISTINCT Productnames) ProductCount
FROM  DBO.Products

COUNT() - this is the function used to get the count.