Hi,
I want the AMOUNT column null should be previous one, and that too based on CATEGORY_ID. The outcome should be like Result column.
P_ID | P_NAME | CATEGORY_ID | AMOUNT | Result |
1 | pepsi | cool drinks | 50 | 50 |
2 | 7up | cool drinks | | 50 |
3 | maza | cool drinks | 40 | 40 |
4 | slice | cool drinks | | 40 |
5 | pizza | food | 100 | 100 |
6 | sprite | cool drinks | | 40 |
7 | burger | food | 50 | 50 |
8 | sandwich | food | 70 | 70 |