begin;
+ -- save the history
+ insert into player_ranks_history
+ select * from player_ranks;
+
+ -- get rid of the existing ranks and refresh them using
+ -- the latest elo information for each game type
delete from player_ranks;
insert into player_ranks(player_id, nick, game_type_cd, elo, rank)