Instruction
Good job! One more exercise before we move on.
Exercise
Create a customer retention chart based on monthly signup cohorts for all years. It should have the following columns:
yearmonthpercent_active_14d(the percentage of customers still active after 14 days).percent_active_30d(the percentage of customers still active after 30 days).
Order the results by year and month.
Stuck? Here's a hint!
Calculate the percent_active_14d column as:
COUNT(CASE WHEN last_order_date - registration_date > INTERVAL '14' day THEN customer_id END) * 100.0 / COUNT(customer_id)




