T-SQL 101: 86 Summarizing data with SUM, AVG, MIN, MAX
I mentioned in a previous post that COUNT was an aggregate. The other common aggregates are shown in this table, and no surprise what they do.
SUM adds up or totals the values.
AVG calculates the average of the values.
MIN works out the minimum value.
MAX works out the maximum value.
But if you’ve started to think about how SQL Server works, you might be wondering about what happens with NULLs.
2021-02-22