I will further explain with a simple example If I had a dataset as follows:
Team   Score
Blue       4
Blue       8
Green      8
Orange     7
Blue       4
Red        5
Red        4
Orange     10
Blue       3
Green      8
Green      5
I want do to something to get the means that expresses:
mean(Score[Team=Blue])
mean(Score[Team=Green])...
I want to be able to do it all at once.
 
    