Instruction
Fantastic job! Let's do one more exercise.
Exercise
Find the number of good customers (defined as those with an average order value greater than 1500.00) in weekly registration and city cohorts (i.e., cohorts defined by both weekly registration and the customer's city). Show the following columns: year, week, city, and good_customers. Order the results by year and week.
Stuck? Here's a hint!
Inside the CTE, select customer_id, registration_date, city, and AVG(total_amount) based on the customers and orders tables. Introduce a HAVING clause.
Use this information in the outer query.




