This chapter addresses the sum, avg, count, count(*), count_big, count_big(*), max, and min aggregate functions that enable you to summarize the data retrieved in a query. This chapter also discusses how to organize data into categories and subgroups using the group by, having, and order by clauses. The compute clause and the union operator, two Transact-SQL extensions, are also discussed.
If your Adaptive Server is not case sensitive, see group by and having Clauses and compute clause in the Reference Manual: Commands for examples on how case sensitivity affects the data returned by these clauses.