MS SQL - Multiple Columns Horizontally - Group By Month
hope you guys can help.
I have some SQL which returns the following information:
Date | Month | Balance | Transactions |
---|---|---|---|
01/01/2020 | January | 20 | Test 1 |
02/01/2020 | January | 21 | Test 2 |
01/02/2020 | February | 20 | Test 3 |
02/02/2020 | February | 21 | Test 4 |
I'd like to get the information so it's like this:
Date | January | Balance | Transactions | Date | February | Balance | Transactions |
---|---|---|---|---|---|---|---|
01/01/2020 | January | 20 | Test 1 | 01/02/2020 | February | 20 | Test 3 |
02/01/2020 | January | 21 | Test 2 | 02/02/2020 | February | 21 | Test 4 |
Any ideas? I've tried Pivots, and it's close, but not there.
Thank in advance for your help!
from Recent Questions - Stack Overflow https://ift.tt/2O1DQjX
https://ift.tt/eA8V8J
Comments
Post a Comment