I have a dataset based on products that change on certain days and some products that change value daily.However its possible for customers to purchase that product up until the date it changes. So when I pull through the data it looks like this EG:
+---------+-------+------------+
| Product | Value | Date |
+---------+-------+------------+
| B | 5 | 21/05/2022 |
| A | 1 | 27/05/2022 |
| B | 2 | 28/05/2022 |
| C | 3 | 27/05/2022 |
| C | 4 | 28/05/2022 |
| A | 7 | 29/05/2022 |
| C | 5 | 29/05/2022 |
+---------+-------+------------+
I am trying to get it into this format:
+------------+---+---+---+
| Date | A | B | C |
+------------+---+---+---+
| 27/05/2022 | 1 | 5 | 3 |
| 28/05/2022 | 1 | 2 | 4 |
| 29/05/2022 | 7 | 2 | 5 |
+------------+---+---+---+
Whats the best way to do this in Teradata SQL (note the example is a bit small, its likely the minimum i would need to repeat certain products is 7 days)