PostgreSQL users and balances – use previous balance for user in time series if value is missing
Given the following tables: users: name alice bob balances: id user_name date balance 1 alice 2022-01-01 100 2 alice 2022-01-03 200 3 alice 2022-01-04 300 4 bob 2022-01-01 400 5 bob 2022-01-02 500 6 bob 2022-01-05 600 I would like…