9 Replies Latest reply on Jul 9, 2014 2:01 PM by philmodjunk

    Averaging Stats For a Basketball Tournament

    MikeProcopio

      Title

      Averaging Stats For a Basketball Tournament

      Post

           In my solution I want to track points for different tournaments a player plays. I have a player table, an event participation table, and an event table.

            

           <Player::_pk_PlayerID>----------<_fk_PlayerID::Event Participation::_fk_EventID>----------<Event::PK_EventID>

            

           In the event participation I have scouting report for the game, but want to add stats like points and rebounds etc which isn't a problem. I would like to have a field to average the stats in each event for each individual player, but having an issue making it work for some reason.

           I tried a summary field in the Event participation table, but that wouldn't work for one reason or another.

           If I have 5 entries for a player in Event 1 I would like for it to give me the average for that specific event as well as the average for Event 2, 3, and likewise. 

            

           Thanks

        • 1. Re: Averaging Stats For a Basketball Tournament
          philmodjunk

               I'm a bit confused by:

               

                    If I have 5 entries for a player in Event 1...

               Why would there be 5 entries and not just 1? What is the purpose of multiple entries for the same event?

               Is each "entry" a different record in the participation table?

          • 2. Re: Averaging Stats For a Basketball Tournament
            MikeProcopio

                 I figured it sounded a little confusing.

                 Basically in event a player can play 3-4 games. I would like to be able to put a report in as well as log their stats in every game that they play in an event. I have a report field already so I can put reports in for multiple games and log stats.

                 What I want it to do is to be able to know the averages for a player in each individual event. I made a field for averaging certain stats, the problem there is it was taking a running total for all the entries in event participation regardless of event. I would like to be able to know leaders in each of event for certain statistics. 

                 I'd like for it to just average for each individual event posted.

                 Also something new that I wanted to do. For each day of the event I put in reports for each player. Not every player plays every day as sometimes they have days off. I list player reports for each event. Is there a way to have the latest report for each player posted in a report. So If Johnny plays today and tomorrow in the report I only want his latest report after each day. Does that make sense? 

            • 3. Re: Averaging Stats For a Basketball Tournament
              philmodjunk
                   

                        Is each "entry" a different record in the participation table?

                   It would appear that the answer to that question should be "yes".

                   Each record in that participation table can then record status for a different game in the tournament. You might link each record also to a related table of Games or just use a few fields to record the date and game played for which each record records stats for.

                   You can then perform finds on the join table to pull up stats for a given player based on date or a range of dates (or all records for a given event...) to produce your reports. There's a summary field that can compute an average of a given number field over all the records in the found set or for a set of related records.

              • 4. Re: Averaging Stats For a Basketball Tournament
                MikeProcopio

                     Sorry Phil didn't read your whole question. I understand the participation table part. I know it can record each game, but linking it to another table is a little confusing to me. Do you mean I have to create another table? I like the idea of the summary field, but for some reason had a tough time trying to find averages based on each event.

                      

                      

                • 5. Re: Averaging Stats For a Basketball Tournament
                  philmodjunk

                       I'm saying that you can link the participation table to another table if you find it useful to do so. If you need to record info about each game--such as listing the opposing teams or other details for inclusion in your reports, a table of Games can be linked in so that you only need to enter that info twice.

                  • 6. Re: Averaging Stats For a Basketball Tournament
                    MikeProcopio

                         Oh ok I thought the participation table were the games that is why I am confused on what other table I can link it to. I don't think I ould need to put infer about other teams or anything I just need to be able to average stats in each event, and be able to list in a portal the events that the players participated and the average of each.

                         How would you suggest in the lamenest of lamens terms to be able to get the averages for each event. I know it seems like I ask the same question over and over which I do, but for some reason this one isn't computing

                    • 7. Re: Averaging Stats For a Basketball Tournament
                      philmodjunk

                           Is each event record a game in the tournament or do you have a single record for each game in the tournament?

                           I've been assuming one event record for the entire tournament--hence my suggestion of linking in a games table.

                      • 8. Re: Averaging Stats For a Basketball Tournament
                        MikeProcopio

                             I have the event table and then attaching players and events was the event participation where I put reports and stats in for. So are you saying that I should have it set up like this?

                             <Player Table>-----<Event Participation>----<Event Table>----<New Table??> 

                             Usually the event participation works well to rank players in an individual event as I can have a report that has rankings of players in all sorts of ways. The thing is if you dil our reports for a player in multiple games that player shows up twice if you have a portal in the event table sorting players by position or ranking.

                             I'd like to be able to dil out multiple game reports in one event for a player and have only 1 entry show up on a portal also be able to average out the stats for each individual event if I play in tournament 1 and score 15 points 10 points and 5 points I'd like to know that in tournament 1 I averaged 10 points for the 3 games and then in tournament 2 I scored 25 points 30 points and 20 points and averaged 25 points over tournament 2. 

                              

                        • 9. Re: Averaging Stats For a Basketball Tournament
                          philmodjunk

                               I'm not suggesting any new table just yet.

                               My last post got a bit conbobulated. What I am asking is if one record in Events stands for one Game or one Tournament. Either could be made to work, but the choice you make affects the implementation details needed in order to make this work.