1. Learn
  2. /
  3. Courses
  4. /
  5. Data Types and Functions in Snowflake

Connected

Exercise

Evaluating workout length

Personal trainers are looking to "right-size" the length of their classes by meeting their members where they're at. They'd like to better understand the average time that users spend in the gym for each workout type. This will help them determine the correct length for each class type.

Instructions

100 XP
  • Create a CTE called workout_durations that returns the gym_id, workout_type, and calculated workout_length from the CORE_GYM.visits table.
  • Pivot the results to create a result set that shows the average workout_length for each gym and workout type.
Powered by Snowflake