GROUP BY clause
Description
The
GROUP BY
clause identifies the grouping columns for the query. Grouping columns must be declared when the query computes aggregates with standard functions such asSUM
,AVG
, andCOUNT
. (Redshift SQL Language Reference GROUP BY Clause)
The GROUP BY clause is fully supported in Snowflake.
Grammar Syntax
Sample Source Patterns
Grouping sets
Input Code:
IN -> Redshift_01.sql
Output Code:
OUT -> Redshift_01.sql
Group by Cube
Input Code:
IN -> Redshift_02.sql
Output Code:
OUT -> Redshift_02.sql
Group by Rollup
Input Code:
IN -> Redshift_03.sql
Output Code:
OUT -> Redshift_03.sql
Related EWIs
There are no known issues.
Last updated