Hello!
I'm hoping someone can help me convert certain rows into columns and concatenate other rows. Here is my data:
SOURCE_APP | DAY | DC_CODE | Sum_AMT |
010_RO | 01 | Credit | -125503.95 |
010_RO | 01 | Debit | 125503.95 |
005_CT | 03 | Credit | -475638.39 |
005_CT | 03 | Debit | 475638.39 |
006_TB | 03 | Credit | -3794473.35 |
006_TB | 03 | Debit | 3794473.35 |
005_CT | 04 | Credit | -395187.48 |
005_CT | 04 | Debit | 395187.48 |
006_TB | 04 | Credit | -3836339.96 |
006_TB | 04 | Debit | 3836339.96 |
010_RO | 04 | Credit | -2286371.48 |
010_RO | 04 | Debit | 2286371.48 |
005_CT | 05 | Credit | -454366.36 |
005_CT | 05 | Debit | 454366.36 |
006_TB | 05 | Credit | -4189221.52 |
006_TB | 05 | Debit | 4189221.52 |
I would like to concatenate SOURCE_APP and DC_CODE and convert the DAYS into columns. Here is a mockup of what I want my output to look like:
SOURCE_APP_DC | 1 | 2 | 3 | 4 | 5 |
005_CT_CREDIT | | | -475638.39 | -395187.48 | -454366.36 |
005_CT_DEBIT | | | 475638.39 | 395187.48 | 454366.36 |
006_TB_CREDIT | | | -3794473.35 | -3836339.96 | -4189221.52 |
006_TB_DEBIT | | | 3794473.35 | 3836339.96 | 4189221.52 |
010_RO_DEBIT | -125503.95 | | | -2286371.48 | |
010_RO_CREDIT | 125503.95 | | | 2286371.48 | |
Thanks!