snowflake.snowpark.DataFrame.group_by_grouping_sets¶
- DataFrame.group_by_grouping_sets(*grouping_sets: Union[GroupingSets, Iterable[GroupingSets]]) RelationalGroupedDataFrame[source]¶
Performs a SQL GROUP BY GROUPING SETS. on the DataFrame.
GROUP BY GROUPING SETS is an extension of the GROUP BY clause that allows computing multiple GROUP BY clauses in a single statement. The group set is a set of dimension columns.
GROUP BY GROUPING SETS is equivalent to the UNION of two or more GROUP BY operations in the same result set.
Examples:
- Parameters:
grouping_sets – The list of
GroupingSetsto group by.