I have MySQL table which stores data in this format
Type|Month|Count
----+-----+-------
1 |9 |4
3 |9 |7
99 |9 |2
1 |10 |6
3 |10 |7
99 |10 |9
.......
Type column can hold either of 3 values 1,3,99. Month will hold values from 1 to 12. Count can be anything random.
The output I desire is something like this:
Month|Type1|Type3|Type99
-----+-----+-----+-------
9 |4 |7 |2
10 |6 |7 |9
................
I came across this Demo but couldn't understand much from it.
Here's a sample fiddle with demo data.
Any help is appreciated.