Perform a cohort analysis on accounts. The cohort is defined by the month the account was opened (cohort_month). For each cohort, count how many accounts had at least one transaction in the same month they were opened (active_in_month_0) versus the total accounts in that cohort (cohort_size). Return cohort_month, cohort_size, active_in_month_0, and activation_rate (rounded to 2 decimals, as a percentage). Order by cohort_month.
Schema
🔑idINT
🔗customer_idINT
account_typeTEXT
balanceREAL
currencyTEXT
opened_atTEXT
statusTEXT
postgresql
Run your query to see results
Press Ctrl + Enter to execute