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.
Example:
SELECT AVG(DISTINCT prdCost) AvgDistinctProductCost
FROM DBO.ProductCostHistory
AVG() - this is the function used to do the average.

Join the conversation! Your thoughts help the community grow.