Window functions to add formula columns
A window function performs calculations across a group of rows in a table, called a window. You can use window functions to perform summations and calculations based on a rolling window of data, relative to the current row. Unlike a normal aggregate ...