I am new to SQL and want to convert row to column. I have a table like below:
| Name |
Metrics |
Period |
estimate |
| BAV |
FFO |
31-Dec-09 |
0.42 |
| BAV |
AFFO |
31-Dec-09 |
0.97 |
| BAV |
AFFO |
31-Dec-10 |
0.7 |
| BAV |
EBDA |
31-Dec-09 |
679000 |
| APB |
FFO |
31-Dec-09 |
0.5 |
| APB |
AFFO |
31-Dec-09 |
1.02 |
| APB |
AFFO |
31-Dec-10 |
0.9 |
| APB |
EBDA |
31-Dec-09 |
800000 |
i want to convert it in below format:
| |
2009 FFO |
2009 AFFO |
2010 AFFO |
2009 EBDA |
| BAV |
0.42 |
0.97 |
0.7 |
679000 |
| APB |
0.5 |
1.02 |
0.9 |
800000 |
Thanks in advance for your help.