I have an Access 97 database that I use to track ice hockey statistics.
The database is 4 tables in all, and I've included the structure of the 4 tables at the end of the message. Apologies to those who hate underscores.
I've created a number of reports based on this database. Right now I'm working on reports that pull player statistics from the database. Generally, there are two key criteria that play into that, which are in the Game_Info table. They are Season and Game_Type. This is because when we talk about statistics, we usually want to specify the season and the type of game (such as Regular Season vs Playoff games).
I've already created a form that asks for those two criteria, and from there can launch a report that gives all of the player statistics given those criteria. (For example, all player statistics for the 2000-2001 Playoffs)
My problem now is that I'm trying to create a report that will give me the entire history for a given player. This would be as follows:
---------
Player name: Steve Battisti
Regular Season Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total (Obviously a calculated field)
Playoff Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total 15 25
Tournament Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total 15 25
----------
Unfortunately, I haven't a clue how to approach this. I'm certain it has something to do with the Sorting/Grouping, but I can't even figure out how to configure the query to base this on.
Any thoughts would be greatly appreciated. I'd be happy to send along a copy of the db to anyone who is interested. The entire thing is only 350K zipped.
Thanks!
Steve Battisti
Table: Game_Info (Data about specific games, such as who played and when, and some overall statistics)
Columns
Name Type Size
Game_ID (PK) Number (Long) 4
Home_Team Number (Long) 4
Visiting_Team Number (Long) 4
Game_Date Date/Time 8
Game_Time Text 50
Game_Location Text 50
Season Text 50
Home_Goals_P1 Number (Long) 4
Home_Goals_P2 Number (Long) 4
Home_Goals_P3 Number (Long) 4
Home_Goals_OT Number (Long) 4
Away_Goals_P1 Number (Long) 4
Away_Goals_P2 Number (Long) 4
Away_Goals_P3 Number (Long) 4
Away_Goals_OT Number (Long) 4
Home_Shots_P1 Number (Long) 4
Home_Shots_P2 Number (Long) 4
Home_Shots_P3 Number (Long) 4
Home_Shots_OT Number (Long) 4
Away_Shots_P1 Number (Long) 4
Away_Shots_P2 Number (Long) 4
Away_Shots_P3 Number (Long) 4
Away_Shots_OT Number (Long) 4
Game_Type Text 50
Recap Memo -
Notes Text 50
Table: Player_History (Detailed record of each action that occurred in any game)
Columns
Name Type Size
Player_Action_ID (PK) Number (Long) 4
Game_ID (FK) Number (Long) 4
Player_ID (FK) Number (Long) 4
Action_Type Text 50
Assist1 Number (Long) 4
Assist2 Number (Long) 4
Start_Time Date/Time 8
End_Time Date/Time 8
Period Text 50
Penalty_Type Text 50
Penalty_Minutes Number (Long) 4
Penalty_Result Text 50
team Number (Long) 4
Table: Player_Info (Information about individual players)
Columns
Name Type Size
Player_ID (PK) Number (Long) 4
Team_ID (FK) Number (Long) 4
First_Name Text 50
Last_Name Text 50
Shoots Text 50
Height Text 50
Weight Number (Long) 4
Birth_Date Date/Time 8
Sex Text 50
Birthplace Text 50
Jersey_No Number (Long) 4
Position Text 50
Nickname Text 50
Phone_Home Text 50
Phone_Work Text 50
Pager Text 50
Phone_Cell Text 50
Street_Address_1 Text 50
Street_Address_2 Text 50
City Text 50
State Text 50
ZIP Text 50
E-mail Text 50
First_Year Text 50
Start_Date Date/Time 8
End_Date Date/Time 8
Table: Team_Info (Information about different teams)
Columns
Name Type Size
Team_ID (PK) Number (Long) 4
Team_Name Text 30
Team_City Text 30
Team_Nickname Text 20
Team_Level Text 20
The database is 4 tables in all, and I've included the structure of the 4 tables at the end of the message. Apologies to those who hate underscores.
I've created a number of reports based on this database. Right now I'm working on reports that pull player statistics from the database. Generally, there are two key criteria that play into that, which are in the Game_Info table. They are Season and Game_Type. This is because when we talk about statistics, we usually want to specify the season and the type of game (such as Regular Season vs Playoff games).
I've already created a form that asks for those two criteria, and from there can launch a report that gives all of the player statistics given those criteria. (For example, all player statistics for the 2000-2001 Playoffs)
My problem now is that I'm trying to create a report that will give me the entire history for a given player. This would be as follows:
---------
Player name: Steve Battisti
Regular Season Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total (Obviously a calculated field)
Playoff Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total 15 25
Tournament Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total 15 25
----------
Unfortunately, I haven't a clue how to approach this. I'm certain it has something to do with the Sorting/Grouping, but I can't even figure out how to configure the query to base this on.
Any thoughts would be greatly appreciated. I'd be happy to send along a copy of the db to anyone who is interested. The entire thing is only 350K zipped.
Thanks!
Steve Battisti
Table: Game_Info (Data about specific games, such as who played and when, and some overall statistics)
Columns
Name Type Size
Game_ID (PK) Number (Long) 4
Home_Team Number (Long) 4
Visiting_Team Number (Long) 4
Game_Date Date/Time 8
Game_Time Text 50
Game_Location Text 50
Season Text 50
Home_Goals_P1 Number (Long) 4
Home_Goals_P2 Number (Long) 4
Home_Goals_P3 Number (Long) 4
Home_Goals_OT Number (Long) 4
Away_Goals_P1 Number (Long) 4
Away_Goals_P2 Number (Long) 4
Away_Goals_P3 Number (Long) 4
Away_Goals_OT Number (Long) 4
Home_Shots_P1 Number (Long) 4
Home_Shots_P2 Number (Long) 4
Home_Shots_P3 Number (Long) 4
Home_Shots_OT Number (Long) 4
Away_Shots_P1 Number (Long) 4
Away_Shots_P2 Number (Long) 4
Away_Shots_P3 Number (Long) 4
Away_Shots_OT Number (Long) 4
Game_Type Text 50
Recap Memo -
Notes Text 50
Table: Player_History (Detailed record of each action that occurred in any game)
Columns
Name Type Size
Player_Action_ID (PK) Number (Long) 4
Game_ID (FK) Number (Long) 4
Player_ID (FK) Number (Long) 4
Action_Type Text 50
Assist1 Number (Long) 4
Assist2 Number (Long) 4
Start_Time Date/Time 8
End_Time Date/Time 8
Period Text 50
Penalty_Type Text 50
Penalty_Minutes Number (Long) 4
Penalty_Result Text 50
team Number (Long) 4
Table: Player_Info (Information about individual players)
Columns
Name Type Size
Player_ID (PK) Number (Long) 4
Team_ID (FK) Number (Long) 4
First_Name Text 50
Last_Name Text 50
Shoots Text 50
Height Text 50
Weight Number (Long) 4
Birth_Date Date/Time 8
Sex Text 50
Birthplace Text 50
Jersey_No Number (Long) 4
Position Text 50
Nickname Text 50
Phone_Home Text 50
Phone_Work Text 50
Pager Text 50
Phone_Cell Text 50
Street_Address_1 Text 50
Street_Address_2 Text 50
City Text 50
State Text 50
ZIP Text 50
E-mail Text 50
First_Year Text 50
Start_Date Date/Time 8
End_Date Date/Time 8
Table: Team_Info (Information about different teams)
Columns
Name Type Size
Team_ID (PK) Number (Long) 4
Team_Name Text 30
Team_City Text 30
Team_Nickname Text 20
Team_Level Text 20