I had a question that is borne out of data that is formatted in a way that isn't optimal to do "versus analysis". For example, we have one record per name per game, and we also have data for the player they played against (always 2 records per game; think center vs. center or pg vs. pg in basketball etc).
Current data:
uid name field1 field2 field3
1 bob 35 0 49
1 evan 4 24 29
2 bob 39 47 26
2 mike 6 40 49
3 bob 48 7 7
3 evan 18 20 11
4 bob 3 49 41
4 evan 25 35 23
Desired Output:
uid name versus field1 field2 field3
1 bob evan same as above
1 evan bob
2 bob mike
2 mike bob
3 bob evan
3 evan bob
4 bob evan
4 evan bob
The goal of this re-arrangement/addition being that now I can do group-by analysis on one player vs. another over multiple games to find how they do on average in that matchup.