By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
14 rows affected
date_details | account_id | user_id |
---|---|---|
2021-01-01 | U1 | A1 |
2021-01-01 | U1 | A2 |
2021-01-01 | U1 | A3 |
2021-01-01 | U1 | A4 |
2021-02-01 | U1 | A1 |
2021-02-01 | U1 | A2 |
2021-02-01 | U1 | A3 |
2021-02-01 | U1 | A4 |
2021-02-01 | U1 | A5 |
2021-01-01 | U2 | A1 |
2021-01-01 | U2 | A2 |
2021-01-01 | U2 | A3 |
2021-02-01 | U2 | A1 |
2021-02-01 | U2 | A2 |
account_id | month_2 | month_1 | growth |
---|---|---|---|
U1 | 5 | 4 | 1 |
U2 | 2 | 3 | 0 |