3 ms·
count(1) as cnt, age from ( select FN(cancled_at, now) as age from accounts where account.signup_date is between x and y ) group by age; where FN is a functio
by aaronblohowiak 15y ago
count(1) as cnt, age from ( select FN(cancled_at, now) as age from accounts where account.signup_date is between x and y ) group by age;
where FN is a function that takes two dates and gives you an integer unit (usually months.) this will give you the distribution of average account lengths for people that started between x and y. note that x-y should be 1 unit in FN(canceled_at, now), or 1 month (where a month is 30 days.)
Then what you can do is either simulate it, or (look at the data), see where you lumps lie so you can do some better back-of-the-napkin LTV calculations...
of course, this does not take into account upgrades or different account levels, etc..