I followed the whole process of you and ErlandSommarskog, and I am still very confused about your question.
The solution I tried:
;with cte
as(select year(signup_clients) yy,month(signup_clients) mm,min(signup_clients) Cohort_Month,max(signup_clients)End_Retention,
count(signup_clients) cohort_size
from clients
group by year(signup_clients),month(signup_clients))
select Cohort_Month,Retention_Month=month(End_Retention)-month(Cohort_Month),End_Retention,cohort_size
from cte
order by yy,mm
If you have any question, please feel free to let me know.
If the response is helpful, please click "Accept Answer" and upvote it.
Regards
Echo
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our [documentation][1] to enable e-mail notifications if you want to receive the related email notification for this thread.
Hot issues October--https://learn.microsoft.com/en-us/answers/questions/142427/users-always-get-connection-timeout-problem-when-u.html