Hi, I want to divide the data by x day cohort.

table

```
SELECT
- earlier time,
sum (case when by_day = 0 then 1 else 0 end) day_0,
sum (case when by_day> 0 and by_day <= 10 then 1 else 0 end) day_10,
sum(case when by_day > 10 and by_day <= 20 then 1 else 0 end) day_20,
sum(case when by_day >20 and before the day <= 30 then 1 else 0 end) day_30,
sum(case when by_day > 30 and until today <= 40 then 1 else 0 end) day_40,
sum(case when by_day >40 and until today <= 50 then 1 else 0 end) day_50,
sum(case when by_day >50 and until today <=60 then 1 else 0 end) day_60,
sum(case when by_day > 60 then 1 plus 0 final) day_60plus
from cohort_days co
```

I want to know is there any easier way to do it than the previous code?