I have the following table which collects accounts details for clients. 1 client is allowed to have multiple accounts of different products i.e.
id acc_balances Product_type
1 2000 4
1 900 5
1 1100 6
2 580 6
2 70 5
2 10 4
The following is the desired outcome:
id Product_type_4 Product_type_5 Product_type_6
1 2000 900 1100
2 10 70 580