I have an input table in Oracle like this. How do i get an output by converting the columns (year number) and corresponding values into rows
INPUT_TABLE
KEY_ID YR1 YR2 YR3 YR4
A 1 2 3 4
B 8 9 10 11
C 15 16 17 18
D 70 71 75 76
Expected OUTPUT
YEAR A B C D
1 1 8 15 70
2 2 9 16 71
3 3 10 17 75
4 4 11 18 76
Sample input and desired output
I have tried the Unpivot option but couldn't get it work for multiple columns (the years can go upto 20) and rows