By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
userid | user_type | registered | archive_date |
---|---|---|---|
1 | A | 2019-12-05 00:00:00 | 2021-11-05 00:00:00 |
2 | B | 2019-12-21 00:00:00 | null |
3 | B | 2020-01-21 00:00:00 | 2020-02-15 00:00:00 |
4 | C | 2021-01-02 00:00:00 | null |
5 | C | 2021-03-04 00:00:00 | null |
6 | A | 2021-12-05 00:00:00 | 2021-12-12 00:00:00 |
year_reg | reg_before | reg_cur | arch_cur | churn_rate |
---|---|---|---|---|
2019 | 0 | 2 | 0 | null |
2020 | 2 | 1 | 1 | 0.5000 |
2021 | 1 | 3 | 2 | 6.0000 |