1. Learn
  2. /
  3. Courses
  4. /
  5. Window Functions in Snowflake

Connected

Exercise

Putting it all together!

This is it! It's time to put everything you've learned to the test. The CEO of your company has come to you looking for a dashboard that gives him an in-depth view of each charging location's high-level metrics. This includes data about things like energy consumed and charging cost. Before you can build this dashboard, you'll need to create a dataset that surfaces this information.

Instructions

100 XP
  • Provide a ranking for each charging session at a certain charging_station_location based on energy_consumed, from greatest to least.
  • Generate a running total of charging_cost by charging_station_location.
  • Build a window frame using the two preceding and two following sessions to find a moving average of energy_consumed by charging_station_location.
Powered by Snowflake