I have this table
|---------------------|------------------|----------|--------|
| Period | Calorie |Tonnage |product |
|---------------------|------------------|----------|--------|
| 2020-01-01 | 4989 |110000 |E5000 |
|---------------------|------------------|----------|--------|
| 2020-02-01 | 5200 |120000 |E5000 |
|---------------------|------------------|----------|--------|
| 2020-03-01 | 7000 |130000 |E5000 |
|---------------------|------------------|----------|--------|
and I the expected output is like this
|---------------------|------------------|----------|--------|
| Info | Jan |Feb |March |
|---------------------|------------------|----------|--------|
| E5000 | 110000 |120000 |130000 |
|---------------------|------------------|----------|--------|
| Calorie | 4989 |5200 |7000 |
|---------------------|------------------|----------|--------|
I am able to flat out single column using pivot, but I don't know how to pivot more than one column and produce result like expected above. below is my current query
select * from (
select
a.[Product],
a.Tonnage,
LEFT( DATENAME(MONTH, [Period]) ,3) as MLM
from
[ProductionData] a
Where
DATEPART(YEAR,a.[Period]) = 2019) PS
PIVOT
(AVG (Tonnage) for MLM in ([Jan],[Feb],[Mar],[Apr],[May],[Jun],[Jul],[Aug],[Sep],[Oct],[Nov],[Dec])) PVT
please advice, Thanks