Last Updated: May 12, 2026
For this exercise, we will work with below data:
Write a query that returns the count of users in each subscription plan, ordered from the most populated plan to the least. Show plan and user_count. Count distinct user_ids per plan.
Write a query that returns each user's signup month and the number of users in that monthly cohort. Show cohort_month (DATE_TRUNC of signup_date) and cohort_size. Order by cohort_month.