...
Consider the dataset below depicting sales (numbers) of specific products in every quarter for a sports goods store.
Quarter | Product | Brand | Sales |
---|---|---|---|
Q1 | Shoes | Nike | 50 |
Q1 | Shirts | Nike | 20 |
Q1 | Socks | Reebok | 40 |
Q1 | Shirts | Reebok | 60 |
Q1 | Shoes | Reebok | 50 |
Q2 | Shoes | Nike | 20 |
Q2 | Shoes | Reebok | 30 |
Q2 | Socks | Nike | 40 |
Q3 | Shoes | Nike | 50 |
Q3 | Shoes | Reebok | 30 |
Q3 | Socks | Reebok | 40 |
Q3 | Socks | Nike | 20 |
Q4 | Shoes | Reebok | 10 |
Q4 | Shirts | Reebok | 20 |
Q4 | Socks | Reebok | 30 |
Q4 | Shoes | Nike | 40 |
Q4 | Shirts | Nike | 50 |
Q4 | Socks | Nike | 60 |
...
The output data will provide the sum of sales by each product for each quarter:
Product | Q1_total | Q2_total | Q3_total | Q4_total |
---|---|---|---|---|
Shoes | 100 | 50 | 80 | 50 |
Socks | 40 | 40 | 60 | 90 |
Shirts | 80 | 0 | 0 | 70 |
...
The output data will provide sum of sales by a brand for each quarter and product:
Brand | Shoes_Q1 | Shoes_Q2 | Shoes_Q3 | Shoes_Q4 | Socks_Q1 | Socks_Q2 | Socks_Q3 | Socks_Q4 | Shirts_Q1 | Shirts_Q2 | Shirts_Q3 | Shirts_Q4 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Nike | 50 | 20 | 50 | 40 | null | 40 | null | 60 | 20 | null | null | 50 |
Reebok | 50 | 30 | 30 | 10 | 40 | null | 40 | 30 | 60 | null | null | 20 |