Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping Values 1

Status
Not open for further replies.

EvilAsh

Technical User
Oct 22, 2005
56
GB
This might be a simple question to answer but here goes.

I have a table with two columns - player & score.

The player column can have the same player name cropping up on numerous occasions and the score is a numerical value.

What I want to do is write a query that groups the player names and gives each players accumulative scores. For example:

The table entries:
Player 1, 10
Player 2, 5
Player 1, 2

Would return:
Player 1, 12
Player 2, 5
etc

I vaguely remember doing something like this in Access years ago but would appreciate your advice as to whether it can be done in MYSQL.

Thanks.
 
Thanks, that worked like a charm. Sometimes I just need to step back and remember the basics! Still its all a learning curve...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top