The LEAD function is incredible when you know the tips and tricks. Tom Coffing will demo the LEAD analytics on Snowflake in a live demo. You will also see a federated query between Snowflake and Azure Synapse across two clouds! Below is your data, with a week of sales data for three products.

Below is an example of the LEAD analytic in action, which places the value of the next row’s daily_sales on the same row. The LEAD allows you to see tomorrow’s daily sales placed next to today’s daily sales value.

However, in the video, we have a working session to show you tips and tricks to get the entire week of sales on a single line per product.