I've got some data in a Postgres table that looks like:
Name | Date | Balance
--------------------------
A |2020-01-01 | 1
B |2020-01-01 | 0
B |2020-01-02 | 2
A |2020-01-03 | 5
(note that A is missing a value for 2020-01-02 and B for 2020-01-03)
I'd like to fill in the missing date with it's most recent value for that name. In other words, I'd like
Name | Date | Balance
--------------------------
A |2020-01-01 | 1
B |2020-01-01 | 0
A |2020-01-02 | 1 <--- filled in with previous balance
B |2020-01-02 | 2
A |2020-01-03 | 5
B |2020-01-03 | 2 <--- filled in with previous balance
Note that in reality, several dates may be missing in a row, in which case the most recent one for that name should always be selected.