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

Connected

Exercise

Engaging vehicle owners with metrics

To better engage vehicle owners, the marketing team is currently using two tables to send a post-charge message comparing that user's session to their vehicle model's average. They'd like to streamline this process, so they've come to you. Time to show them what you're made of!

Instructions 1/3

undefined XP
  • 1
    • Use a window function to count the total number of charging sessions by vehicle_model.
  • 2
    • Find the total charging_duration for all charging sessions, partitioned by vehicle_model.
  • 3
    • Determine the average energy_consumed for across all charging sessions for each vehicle_model.