1. Learn
  2. /
  3. Courses
  4. /
  5. Analyzing Business Data in SQL

Connected

Exercise

Bucketing users by revenue

Based on his analysis, Dave identified that $150 is a good cut-off for low-revenue users, and $300 is a good cut-off for mid-revenue users. He wants to find the number of users in each category to tweak Delivr's business model.

Split the users into low, mid, and high-revenue buckets, and return the count of users in each group.

Instructions

100 XP
  • Store each user ID and the revenue it generates in the user_revenues CTE.
  • Return a table of the revenue groups and the count of users in each group.