By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
user_id | history_date | product1 | product2 | product3 | DailyTotal | TotalRank |
---|---|---|---|---|---|---|
1 | 2022-01-01 | 1 | 0 | 0 | 0.75 | 2 |
1 | 2022-01-02 | 1 | 1 | 1 | 2.90 | 2 |
user_id | history_date | product1 | product2 | product3 | DailyTotal | TotalRank |
---|---|---|---|---|---|---|
1 | 2022-01-01 | 1 | 0 | 0 | 0.75 | 2 |
1 | 2022-01-02 | 1 | 1 | 1 | 2.90 | 2 |