2 -- get rid of the existing summary stats since we're about to refresh
3 delete from summary_stats;
5 insert into summary_stats(total_players, total_servers, total_games,
6 total_dm_games, total_duel_games, total_ctf_games)
8 select game_type_cd, count(*) total_games
10 where game_type_cd in ('duel', 'dm', 'ctf')
14 select count(*) total_players
16 where active_ind = true
19 select count(*) total_servers
21 where active_ind = true
23 select tp.total_players, ts.total_servers, dm.total_games+duel.total_games+ctf.total_games total_games,
24 dm.total_games dm_games, duel.total_games duel_games, ctf.total_games ctf_games
25 from total_games dm, total_games duel, total_games ctf, total_players tp, total_servers ts
26 where dm.game_type_cd = 'dm'
27 and ctf.game_type_cd = 'ctf'
28 and duel.game_type_cd = 'duel';