I have a table with 31 columns which contain values for each day in a month and I want to create a tranpose table like the example below. Real data in the database is really big so I don't expect to use Excel to solve this problem. Can this be done by using SQL or is there any tool that can do this?
Original table
+----+--------------+--------------+-----+---------------+---------------+
| ID | price_date_1 | price_date_2 | ... | price_date_30 | price_date_31 |
+----+--------------+--------------+-----+---------------+---------------+
| A | 1 | 2 | ... | 0 | 1 |
| B | 2 | 3 | ... | 1 | 2 |
+----+--------------+--------------+-----+---------------+---------------+
New table
+---------------+---+---+
| Price | A | B |
+---------------+---+---+
| price_date_1 | 1 | 2 |
| price_date_2 | 2 | 3 |
| ... | | |
| price_date_30 | 0 | 1 |
| price_date_31 | 1 | 2 |
+---------------+---+---+