We have a query which fetches data as below
Now, we need to convert that data as rows to columns and the final output we required should be as below
Can anyone please help me on how to achieve this.
The actual data(as shown in first image) is from a query, not a direct table data.
We have to achieve this only through SQL(please don't ask me why only though query :-) )
I already tried using PIVOT/UNPIVOT. But seems, to use those we need to have a aggregate functions. But in my case, it is purely converting rows to columns blindly.
The PERIOD_FROM and VALUE are not fixed(Our client company's current period starts from 30-Oct. And we need to fetch current + future 6 months data which is as show in images)
Awaiting for your help
Thanks in Advance,