File: /home/bpro/www/bpro.ru/html/bitrix/modules/statistic/classes/mysql/session.php
Line: 49
MySQL Query Error: SELECT sum(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST))/count(S.ID) AM_AVERAGE_TIME, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<60,1,0)) AM_1, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=60 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<180,1,0)) AM_1_3, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=180 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<360,1,0)) AM_3_6, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=360 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<540,1,0)) AM_6_9, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=540 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<720,1,0)) AM_9_12, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=720 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<900,1,0)) AM_12_15, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=900 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<1080,1,0)) AM_15_18, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=1080 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<1260,1,0)) AM_18_21, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=1260 and UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)<1440,1,0)) AM_21_24, sum(if(UNIX_TIMESTAMP(S.DATE_LAST)-UNIX_TIMESTAMP(S.DATE_FIRST)>=1440,1,0)) AM_24, sum(S.HITS)/count(S.ID) AH_AVERAGE_HITS, sum(if(S.HITS<=1, 1, 0)) AH_1, sum(if(S.HITS>=2 and S.HITS<=5, 1, 0)) AH_2_5, sum(if(S.HITS>=6 and S.HITS<=9, 1, 0)) AH_6_9, sum(if(S.HITS>=10 and S.HITS<=13, 1, 0)) AH_10_13, sum(if(S.HITS>=14 and S.HITS<=17, 1, 0)) AH_14_17, sum(if(S.HITS>=18 and S.HITS<=21, 1, 0)) AH_18_21, sum(if(S.HITS>=22 and S.HITS<=25, 1, 0)) AH_22_25, sum(if(S.HITS>=26 and S.HITS<=29, 1, 0)) AH_26_29, sum(if(S.HITS>=30 and S.HITS<=33, 1, 0)) AH_30_33, sum(if(S.HITS>=34, 1, 0)) AH_34 FROM b_stat_session S WHERE S.DATE_STAT = cast('2024-10-06 00:00:00' as date) [Table './bpro/b_stat_session' is marked as crashed and should be repaired]