i have this table
| Sr.ID | Type | Amount | Advance | Discount |
| 123456 | CREDIT | 2000 | 500 | |
| 123789 | DEBIT | 4000 | 10 | |
| 123789 | | | | 0.3 |
| 123963 | CREDIT | 300 | 0 | 0 |
| 123852 | CREDIT | 4000 | 1000 | |
| 123852 | | | | 0.25 |
| 147852 | DEBIT | 8000 | 3500 | |
| 147852 | | | | 0.15 |
| 159753 | DEBIT | 3500 | 5 | 0.1 |
Results should be like this
| Sr.ID | Credit_Type | Debit_Type | Amount | Advance | Discount |
| 123456 | CREDIT | | 2000 | 500 | 0 |
| 123789 | | DEBIT | 4000 | 10 | 0.3 |
| 123963 | CREDIT | | 300 | 0 | 0 |
| 123852 | CREDIT | | 4000 | 1000 | 0.25 |
| 147852 | | DEBIT | 3500 | 5 | 0.1 |