In T-SQL Group by clause is used to summarize data for a given parameter. Real power of Group By clause may be exploited when using with Aggregate functions. Before further example and explanation it would be better to mention list of aggregate functions in T-SQL.
Aggregate functions used in T-SQL are as follows
- ROLLUP or CUBE function
For use of explanation above functions you may visit link on MSQLTips.com
In case when aggregate functions are used with Group By clause, aggregate function is applied to each group produced in result. To understand the concept with a very use full example please follow the link to see this use for removing duplicate rows from a table.