Get startedGet started for free

Period-over-Period Change with LAG

Harbr's finance team tracks whether credit consumption is trending up or down month on month across each warehouse. Rather than joining the table to itself, you'll use LAG() to pull the previous month's credits alongside the current month's value in a single row, then compute the difference. Your task is to build that query against logistics.warehouse_usage and identify which warehouse had the largest single month-over-month increase.

⚠️ Can't select a database, or getting a "table not found" error?

Use the table's full path in your FROM clause. Get it from the left panel: Databases tab → expand your COURSE_… database → select the table → Copy name.

This exercise is part of the course

Data Pipeline Automation in Snowflake

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise