Rolling Functions
Calculates a window function operates on a group (“window”) of related rows
Last updated
Calculates a window function operates on a group (“window”) of related rows
Last updated
The rolling node allows you to perform calculations across a set of rows related to the current row. Unlike regular aggregate functions, which return a single value for a group of rows, window functions return a value for each row based on the rows within its "window."
Learn more in our tutorial: Window Functions
Select the column to calculate aggregation and choose one of the aggregation functions: Average, Count, Min, Max, Sum.
This parameter defines the range of rows that should be included in the window frame relative to the current row and their sorting.
starts from - ends with
Specify the frame using one of the following options:
All preceding. Includes all rows from the start of the partition to the current row.
Preceding. Includes the previous n rows before the current row.
Current row. Includes the current row only.
Following. Includes the next n rows after the current row.
All following. Includes all rows from the current row to the end of the partition.
sorted by
This parameter is used to specify the order in which the window function will process the rows. Defining the order, especially when using ranking or numbering functions, is important as it directly impacts the output.
This parameter divides the data into partitions to which the window function is applied. If you don't specify the "Partitioned by" clause, the function will treat the whole result set as a single partition.
Enter the name for a newly created column.