Создание веб-приложения, сочетающего в себе проектирование и создание баз данных, работу со сторонними форматами данных, программирование в NET и веб-разработку, страница 90

                sql = "select " + table_team_stats + ".game,teams.name as team,sum(" + table_team_stats + ".ratingppl) AS ppl,sum(" + table_team_stats + ".gp) AS gp,sum(" + table_team_stats + ".w) AS w,sum(" + table_team_stats + ".w_ot) as wot,sum(" + table_team_stats + ".w_so) as wso,sum(" + table_team_stats + ".l_so) as lso,sum(" + table_team_stats + ".l_ot) as lot,sum(" + table_team_stats + ".l) as l,sum(" + table_team_stats + ".p) as p,ROUND(sum(" + table_team_stats + ".p)/(select tournaments.w from tournaments where tournaments.id = (select conferences.league from conferences inner join divisions on divisions.conference = conferences.id inner join teams on divisions.id=teams.division  inner join " + table_team_stats + " on teams.id = " + table_team_stats + ".team group by conferences.league)*sum(" + table_team_stats + ".gp))*100,1) as per,sum(" + table_team_stats + ".gf) as gf,sum(" + table_team_stats + ".ga) AS ga, sum(" + table_team_stats + ".gf)-sum(" + table_team_stats + ".ga) AS d,sum(" + table_team_stats + ".sho_w) as sw,sum(" + table_team_stats + ".sho_l) as sl,sum(" + table_team_stats + ".pp) as pp,sum(" + table_team_stats + ".pp_w) as ppg,sum(" + table_team_stats + ".pp_ga) as ppga,ROUND(sum(" + table_team_stats + ".pp_w)/sum(" + table_team_stats + ".pp)*100,1) as pper,sum(" + table_team_stats + ".pk) as pk,ROUND(sum(" + table_team_stats + ".pk_w)/sum(" + table_team_stats + ".pk)*100,1) as pker,sum(" + table_team_stats + ".pk_g) as pkg,ROUND(sum(" + table_team_stats + ".s_g)/sum(" + table_team_stats + ".gp),1) as s,ROUND(sum(" + table_team_stats + ".sa_g)/sum(" + table_team_stats + ".gp),1) as sa,ROUND(sum(" + table_team_stats + ".g1_w)/sum(" + table_team_stats + ".g1)*100,1) as g1w,ROUND(sum(" + table_team_stats + ".ga1_w)/sum(" + table_team_stats + ".ga1)*100,1) as ga1w,ROUND(sum(" + table_team_stats + ".os_g)/sum(" + table_team_stats + ".os)*100,1) as os,ROUND(sum(" + table_team_stats + ".osa_g)/sum(" + table_team_stats + ".osa)*100,1) as osa,ROUND(sum(" + table_team_stats + ".fo_w)/sum(" + table_team_stats + ".fo)*100,1) as fo, " + table_team_stats + ".date_game, " + table_team_stats + ".date_log, " + table_team_stats + ".log, " + table_team_stats + ".stats_game, " + table_team_stats + ".stats_player," + table_team_stats + ".stats_teams from " + table_team_stats + " inner join teams on teams.id = " + table_team_stats + ".team " + where + " " + team_filter + " " + game_filter + " group by " + table_team_stats + ".team order by per DESC";

                dt.Clear();

                da = new MySqlDataAdapter(sql, conn);

                da.Fill(dt);

                report.DataSource = dt;

                report.DataBind();

                conn.Close();

            }

            catch (MySqlException exp)

            {

                conn.Close();

            }

        }

        public static void getTeamsByLeague(GridView report, string league)

        {

            string database = "powerplay";

            string password_db = "admin";

            string user_db = "root";

            string server_db = "localhost";

            connectionString = ("server=" + server_db + "; user id=" + user_db + "; password=" + password_db + "; database=" + database + "");

            MySqlConnection conn = null;