http://technet.microsoft.com/en-us/library/ms177410(SQL.105).aspx
In some cases I have seen the aggregate function as sum, Max or avg. How to determin which aggregate function to use in the PIVOT statement? Thank you, smith
http://technet.microsoft.com/en-us/library/ms177410(SQL.105).aspx
In some cases I have seen the aggregate function as sum, Max or avg. How to determin which aggregate function to use in the PIVOT statement? Thank you, smith
You can use any aggregate function in the PIVOT
but it depends on what your requirement is for the query.
Aggregate Functions include:
SUM()
MIN()
MAX()
COUNT()
AVG()