Here's a sample of the data set I'm working with:
+------------+----------+--------+
| vegetables | basket | amount |
+------------+----------+--------+
| tomatoes | basketA | 11 |
| cabbage | basketB | 21 |
| carrot | basketC | 12 |
| beans | basketD | 23 |
| cabbage | basketD | 13 |
| tomatoes | basketB | 23 |
| beans | basketB | 13 |
| carrot | basketA | 13 |
+------------+----------+--------+
I have a problem in making a query from the data so that it can display the table as follows. maybe use GROUP BY but i'm having trouble compiling it
+------------+----------+---------+----------+---------+---------+
| vegetables | basketA | basketB | basketC | basketD | total |
+------------+----------+---------+----------+---------+---------+
| tomatoes | 11 | 23 | | | 34 |
| cabbage | | 21 | | 13 | 34 |
| carrot | 13 | | 12 | | 35 |
| beans | | 13 | | 23 | 36 |
+------------+----------+---------+----------+---------+---------+