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

This blog shows how to do an average of group of distinct values using the Average function in SQL Server

Example:

SELECT AVG(DISTINCT prdCost) AvgDistinctProductCost
FROM DBO.ProductCostHistory

AVG() - this is the function used to do the average.