Transpose Columns to Rows

Michael Martey Marmah 20 Reputation points
2023-01-25T13:19:55.1633333+00:00

I have a table as below

Account Jan Feb March April May June
41000000 100 350 200 450 120 900
90881233 120 900 340 230 129 300

How can I transpose it to be like the below

Account Month Total
41000000 Jan 100
41000000 Feb 350
41000000 March 200
41000000 April 450
41000000 May 120
41000000 June 900
90881233 Jan 120
90881233 Feb 900
90881233 March 340
90881233 April 230
90881233 May 129
90881233 June 300
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,361 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful