I am trying to convert a long table into wide table in SAS. I have the following data
Team ID Player Score
1 Andy 12
2 Andy 32
1 Andy 2
3 Andy 0
1 Andy 43
3 Bin 33
1 Bin 23
3 Bin 34
3 Bin 3
1 Bin 12
2 Ray 34
3 Ray 52
2 Ray 11
Now I want to add score of each player teamwise like
Team ID Player Score
1 Andy 46
1 Ray 34
1 Bin 33
2 Andy 43
2 Ray 52
3 Bin 72
3 Ray 11
Now I want to tanspose the players so that I get one row for each team like this.
Team ID Andy Ray Bin
1 46 34 33
2 43 52 .
3 . 11 72
I tried with proc transpose and proc means but couldn't find a suitable solution. Will appreciate your help for a sas code.
Regards