If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Player ratings

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 1
Player ratings

First time poster and really new to SQL

I use several in the following conditions to indicate that from one year to the next things fluctuate.

I have a data base going back several years.
Each Year has at least two seasons.
Each season has several leagues
Each league plays several matches per season.
Each Match can consist of 8 or 12 games depending on league
Each Match consist of 2 or 3 types of games (4 Games each).
Not every player will play in all types of games.

DB shows for each person the following:


Index Result, Player1_number, opp_Player1_number, team number, opp_team_num, week, Homeaway,Win,loss,game_code,season,rating
At this time there is nothing in rating.

For every game there are 2 entries; 1 showing player 1 vs player 2 win, and another showing player 2 V player 1 loss.

So what I want to do is the following:
run something within sql that will
a) look at year, then season, then Game_code, then Player1_number.
b) determine if there is a win or loss, then do a computation and adjust player 1 and player 2 in the rating column.
c) check to see if some people did not play in that particular game and assign their old rating value.
Move to next game, reapeat above process using new rating value.

So on and so for about 360 games - 11 season - 4 years.

Any thought?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On