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

Connected

Exercise

Identifying inefficient chargers

Over time, chargers become less efficient. When this is the case, these chargers either need maintenance or to be replaced. A charger is determined to be efficient or inefficient based on charging rate. To help identify chargers that might need a refresh, you'll need to build a query that uses window frames to find the average charging rate and remaining number sessions for a charger. Good luck!

Instructions

100 XP
  • Find the average charging_rate, by charging_station_location using a window frame between the first row and the current row.
  • Count the number of records by charging_station_location.
  • Create a window frame between the current row and the last row, ordered by charging_start_time.
Powered by Snowflake