Hail,
I have a database that stores some stats for a hockey league in the following manner:
Field names are GP, G, A
Whenever a player Plays a game, his ID is added to the column GP while other columns go to 0
If a player scores a goal, his ID goes under G, the guy who assisted goes under A
What I want is a query that can give me the count for each ID that shows up in GP for GP, G and A
Is there an easy way to do this with just one statement? Right now, it's really messy since I have to loop through each player ID in GP and make individual queries to count GP, G and A because I can't figure out an easier way and I don't want to rebuild the DB
I have a database that stores some stats for a hockey league in the following manner:
Field names are GP, G, A
Whenever a player Plays a game, his ID is added to the column GP while other columns go to 0
If a player scores a goal, his ID goes under G, the guy who assisted goes under A
What I want is a query that can give me the count for each ID that shows up in GP for GP, G and A
Is there an easy way to do this with just one statement? Right now, it's really messy since I have to loop through each player ID in GP and make individual queries to count GP, G and A because I can't figure out an easier way and I don't want to rebuild the DB