Lets say I have the following data:
+---------------------+---------+---------------------+
| date | tokenId | last_price |
|---------------------+---------+---------------------|
| 2021-07-01 00:00:00 | 1 | <null> |
| 2021-08-01 00:00:00 | 1 | 5.0 |
| 2021-09-01 00:00:00 | 1 | <null> |
| 2021-10-01 00:00:00 | 1 | <null> |
| 2021-11-01 00:00:00 | 1 | 4.6000000000000005 |
| 2021-12-01 00:00:00 | 1 | <null> |
| 2022-01-01 00:00:00 | 1 | <null> |
| 2022-02-01 00:00:00 | 1 | <null> |
| 2022-03-01 00:00:00 | 1 | <null> |
| 2022-04-01 00:00:00 | 1 | <null> |
| 2022-05-01 00:00:00 | 1 | <null> |
| 2021-07-01 00:00:00 | 18 | 0.09200000000000001 |
| 2021-08-01 00:00:00 | 18 | <null> |
| 2021-09-01 00:00:00 | 18 | <null> |
| 2021-10-01 00:00:00 | 18 | <null> |
| 2021-11-01 00:00:00 | 18 | 7.6000000000000005 |
| 2021-12-01 00:00:00 | 18 | <null> |
| 2022-01-01 00:00:00 | 18 | 15.200000000000001 |
| 2022-02-01 00:00:00 | 18 | <null> |
| 2022-03-01 00:00:00 | 18 | <null> |
| 2022-04-01 00:00:00 | 18 | <null> |
| 2022-05-01 00:00:00 | 18 | <null> |
+---------------------+---------+---------------------+
How could I fill the null rows with the last price of each token from the previous rows like that:
+---------------------+---------+---------------------+
| date | tokenId | last_price |
|---------------------+---------+---------------------|
| 2021-07-01 00:00:00 | 1 | <null> |
| 2021-08-01 00:00:00 | 1 | 5.0 |
| 2021-09-01 00:00:00 | 1 | 5.0 |
| 2021-10-01 00:00:00 | 1 | 5.0 |
| 2021-11-01 00:00:00 | 1 | 4.6000000000000005 |
| 2021-12-01 00:00:00 | 1 | 4.6000000000000005 |
| 2022-01-01 00:00:00 | 1 | 4.6000000000000005 |
| 2022-02-01 00:00:00 | 1 | 4.6000000000000005 |
| 2022-03-01 00:00:00 | 1 | 4.6000000000000005 |
| 2022-04-01 00:00:00 | 1 | 4.6000000000000005 |
| 2022-05-01 00:00:00 | 1 | 4.6000000000000005 |
| 2021-07-01 00:00:00 | 18 | 0.09200000000000001 |
| 2021-08-01 00:00:00 | 18 | 0.09200000000000001 |
| 2021-09-01 00:00:00 | 18 | 0.09200000000000001 |
| 2021-10-01 00:00:00 | 18 | 0.09200000000000001 |
| 2021-11-01 00:00:00 | 18 | 7.6000000000000005 |
| 2021-12-01 00:00:00 | 18 | 7.6000000000000005 |
| 2022-01-01 00:00:00 | 18 | 15.200000000000001 |
| 2022-02-01 00:00:00 | 18 | 15.200000000000001 |
| 2022-03-01 00:00:00 | 18 | 15.200000000000001 |
| 2022-04-01 00:00:00 | 18 | 15.200000000000001 |
| 2022-05-01 00:00:00 | 18 | 15.200000000000001 |
+---------------------+---------+---------------------+
I have found some good answer about the similar question here, but I can't understand how I can use it with additional grouping by tokenId field.