I have data in a mysql table in the format
C1 | C2 | C3 (Column titles)
A1 | X1 | Y1
A1 | X2 | Y2
A1 | X3 | Y3
B1 | X1 | Y4
B1 | X2 | Y5
B1 | X3 | Y6
B1 | X4 | Y7
C1 | X1 | Y8
C1 | X2 | Y9
I’d like to convert this to
00 | X1 | X2 | X3 | X4
A1 | Y1 | Y2 | Y3 |
B1 | Y4 | Y5 | Y6 | Y7
C1 | Y8 | Y9
Much like a pivot table but putting the actual values of Yx in the table rather than performing an operation (Sum / Avg etc.) on them.
Is there an easy way to do this in mysql or excel/libreoffice?
Thanks
SQLFiddle demo