1. 학습
  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