I have a table that looks like this:
user id | observation |
---|---|
25 | 2 |
25 | 3 |
25 | 2 |
23 | 1 |
23 | 3 |
the desired outcome is:
user id | observation | retention |
---|---|---|
25 | 7 | 3 |
23 | 4 | 2 |
I want to keep the user id column with unique ids and have another column showing how many times this id has appeared in the dataset summing up the observation column values.
any help will be appreciated thanks