
Snowflake Cookbook
By :

The recipe will provide you with insight into Snowflake's ability to run ordered or simple analytics over subsets of rows. Such analytics are typically used in marketing analytics applications, where moving average or cumulative functions are applied to data to identify trends. These capabilities help data scientists wrangle large datasets.
Note that this recipe's steps can be run either in the Snowflake WebUI or the SnowSQL command-line client. We shall be generating data that we intend to use in this recipe. The dataset will have three columns: customer_id
, deposit_dt
, and deposit
. This data will capture deposits that have been made by a customer on a particular date.
Let's start by generating some sample data. We shall create a view with the logic to generate data: