GROUP BY techniques
Useful GROUP BY techniques (source: Jeff's Blog (SQLTeam hosted)) for SQL Server developers. Rather than grouping unneccesarily columns, use a derived table. i.e. (SELECT ... FROM ... WHERE ... GROUP BY ...) AggregateTableName
. Plus don't group expressions, but the columns that make up the expression.
Tags: Web Developer Blog, SQL Server, SQL Team
Comments