I have a table criteria
whose structure is like this:
+----------+------+-------+
| criteria | user | total |
+----------+------+-------+
| xxxxxxxx | xx | xxx |
+----------+------+-------+
I have a problem to creating a query. I want make a pivot query from a single table, and I have this data:
+----------+------+-------+
| criteria | user | total |
+----------+------+-------+
| F1 | A1 | 17 |
| F2 | A1 | 9 |
| F3 | A1 | 6 |
| F4 | A1 | 4 |
| F1 | A2 | 19 |
| F2 | A2 | 6 |
| F3 | A2 | 2 |
| F4 | A2 | 8 |
+----------+------+-------+
and i want to make query pivot like this :
+----------+------+-------+------+-------+
| criteria | user | total | user | total |
+----------+------+-------+------+-------+
| F1 | A1 | 17 | A2 | 19 |
| F2 | A1 | 9 | A2 | 6 |
| F3 | A1 | 6 | A2 | 2 |
| F4 | A1 | 4 | A2 | 8 |
+----------+------+-------+------+-------+
Can somebody help me write a query to get the above result?