1. Learn
  2. /
  3. कोर्स
  4. /
  5. Data Pipeline Automation in Snowflake

Connected

अभ्यास

Running totals with SUM

Harbr's finance team wants to track how credit consumption accumulates over time for each warehouse. You'll build a running total using SUM() as a window function on logistics.warehouse_usage, which contains warehouse_name, usage_month, and credits_used.

निर्देश

100 XP
  • Select warehouse_name, usage_month, and credits_used.
  • Add a running_total column using SUM(credits_used) partitioned by warehouse_name and ordered by usage_month.
Powered by Snowflake