How can I convert the following:
+------+---------+------+
| Date | Product | Sold |
+------+---------+------+
| 1/1 | P1 | 100 |
| 1/1 | P2 | 250 |
| 1/1 | P3 | 50 |
| 2/1 | P1 | 170 |
| 2/1 | P2 | 0 |
| 2/1 | P3 | 70 |
+------+---------+------+
Into a table like this:
+------+-----+-----+----+
| Date | P1 | P2 | P3 |
+------+-----+-----+----+
| 1/1 | 100 | 250 | 50 |
| 2/1 | 170 | 0 | 70 |
+------+-----+-----+----+
Using SQL?
I know the number of products (exactly 3).