I need help with my stored procedure. I am trying to perform a calculation query. My table looks like this:
Table Name: GameStats
Composite Primary Key: GameID and PlayerID
Fields: AtBats, Hits
I am trying to calculate the batting average for each player on my baseball team. Batting average is Hits divided by AtBats. So I need to total up the number of hits and then total up the number of at bats for all the games and then calculate the batting average.
Your help is greatly appreciated.
Youth Baseball Coach
Table Name: GameStats
Composite Primary Key: GameID and PlayerID
Fields: AtBats, Hits
I am trying to calculate the batting average for each player on my baseball team. Batting average is Hits divided by AtBats. So I need to total up the number of hits and then total up the number of at bats for all the games and then calculate the batting average.
Your help is greatly appreciated.
Youth Baseball Coach