How can I find the average retention rate?

Use our Cohort CQL to calculate a user retention rate on the last 30 days.

select bucket_id, avg(Retention) as Retention
from
(select cohort_name, cohort_id, cohort_size, bucket_id, count(distinct user_id, exact)*100/cohort_size as Retention
from cooladata
where date_range(last 30 days) 
and TRUE CLUSTER COHORT BY 1 DAYS EACH
STARTS WITH TRUE
FOLLOWED BY TRUE
BUCKET BY 1 DAYS ALL
having cohort_id < 31 and bucket_id < 31
group by cohort_name, cohort_id, cohort_size, bucket_id
  )
  group by 1
  order by 1
Segentation
Cohort Analysis