MySQL Error!
MySQL error in file: /sidebar_topforecasts.php at line 23
Error Number: 2006
The Error returned was:
MySQL server has gone away
SQL query:

SELECT COUNT(username) as cnt, SUM(win) as wins, SUM(lose) as loses, SUM(win) + SUM(lose) AS total, ROUND(100* SUM(win) / (SUM(win) + SUM(lose)), 1) as percent, ROUND(SUM(CASE WHEN win=1 THEN coef ELSE NULL END) / COUNT(CASE WHEN win=1 THEN coef ELSE NULL END), 1) as coefm, ROUND((SUM(win) * ROUND(SUM(CASE WHEN win=1 THEN coef ELSE NULL END) / COUNT(CASE WHEN win=1 THEN coef ELSE NULL END), 1) * ROUND(100 * SUM(win) / (SUM(win) + SUM(lose)), 1)) / 100, 1) as result, username FROM dle_topforecast INNER JOIN dle_users ON dle_topforecast.username=dle_users.name WHERE (dle_users.user_group=6 OR dle_users.user_group=8) AND moder=1 GROUP BY username ORDER BY result DESC LIMIT 10