I keep getting tis error when I do a housekeeping, I have only provided the start and the end of the error message because its 10 pages long.
There were errors during the housekeeping process:
Unable to prepare query: INSERT INTO tourney_holdem_cache SELECT tourney_holdem_hand_player_statistics.id_player, tourney_holdem_hand_player_statistics.id_blinds, tourney_holdem_hand_summary.cnt_players, ((case when( lookup_positions.flg_blinds) then 0 else (case when( lookup_positions.flg_ep) then 1 else (case when( lookup_positions.flg_mp) then 2 else 3 end) end) end)),
(sum( (CASE WHEN ( (tourney_holdem_blinds.amt_bb *tourney_holdem_blinds.val_nlpl_mult)) 0 THEN ((tourney_holdem_hand_player_statistics.amt_won * 1.0 )/( (tourney_holdem_blinds.amt_bb *tourney_holdem_blinds.val_nlpl_mult))) ELSE 0 END) )),
(sum(tourney_holdem_hand_player_detail.amt_blind)),
(sum(tourney_holdem_hand_player_statistics.amt_won)),
(sum( (case when(tourney_holdem_hand_player_statistics.flg_blind_b and tourney_holdem_hand_player_statistics.flg_blind_s = false) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_blind_b AND tourney_holdem_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action LIKE 'C') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_bb_steal_fold) then 1 else 0 end))),
(sum((case when( tourney_holdem_hand_player_statistics.flg_blind_b AND tourney_holdem_hand_player_statistics.flg_blind_def_opp AND tourney_holdem_hand_player_statistics.cnt_p_raise > 0) then 1 else 0 end))),
(sum( (case when(tourney_holdem_hand_player_statistics.flg_blind_b OR tourney_holdem_hand_player_statistics.flg_blind_s) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_3bet) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_3bet_action='C') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_3bet_action='F') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_3bet_action='R') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_3bet_def_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_3bet_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_4bet) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_4bet_action='C') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_4bet_action='F') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.enum_f_4bet_action='R') then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_4bet_def_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_4bet_opp) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_statistics.flg_f_bet) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0 AND (lookup_actions_f.action SIMILAR TO '(C|XC)%')) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0 AND (lookup_actions_f.action SIMILAR TO '(F|XF)%')) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0 AND (lookup_actions_f.action SIMILAR TO '(R|XR)%')) then 1 else 0 end))),
(sum((case when(tourney_holdem_hand_player_detail.amt_f_bet_facing > 0) then 1 else 0 end))),
(sum((case when( (tourney_holdem_hand_player_statistics.flg_f_bet OR tourney_holdem_hand_player_statistics.cnt_f_raise > 0)) then 1 else 0 end))),
(sum(tourney_holdem_hand_player_statistics.cnt_f_call)),
(sum((case when(tourney_holdem_hand_player_statistics.cnt_f_call > 0) then 1 else 0 end))),
.........
tourney_holdem_hand_player_detail.amt_ante)) 20)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_vpip and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 5)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_vpip and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 10)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) > 50) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 20)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 5)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 50) ) then 1 else 0 end))), (sum( (case when(tourney_holdem_hand_player_statistics.flg_showdown AND tourney_holdem_hand_player_statistics.flg_won_hand and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 20)) ) then 1 else 0 end))), (sum( (case when(tourney_holdem_hand_player_statistics.flg_showdown AND tourney_holdem_hand_player_statistics.flg_won_hand and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 5)) ) then 1 else 0 end))), (sum( (case when(tourney_holdem_hand_player_statistics.flg_showdown AND tourney_holdem_hand_player_statistics.flg_won_hand and (tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 10)) ) then 1 else 0 end))), (sum((case when(tourney_holdem_hand_player_statistics.flg_showdown and ((tourney_holdem_hand_player_detail.amt_before * 1.0 / ( tourney_holdem_blinds.amt_bb + tourney_holdem_blinds.amt_sb + (tourney_holdem_hand_summary.cnt_players * tourney_holdem_hand_player_detail.amt_ante)) 10)) ) then 1 else 0 end))), ( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) 0 THEN ((100 * (sum((case when(tourney_holdem_hand_player_statistics.flg_p_fold) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ), (( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) 0 THEN (((sum((case when(tourney_holdem_hand_player_statistics.cnt_p_raise > 0) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ) * 100), (CASE WHEN ( ((sum(tourney_holdem_hand_player_statistics.cnt_f_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_t_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_r_call)))) 0 THEN (( ((sum((case when(tourney_holdem_hand_player_statistics.flg_f_bet) then 1 else 0 end))) + (sum(tourney_holdem_hand_player_statistics.cnt_f_raise)) + (sum((case when(tourney_holdem_hand_player_statistics.flg_t_bet) then 1 else 0 end))) + (sum(tourney_holdem_hand_player_statistics.cnt_t_raise)) + (sum((case when(tourney_holdem_hand_player_statistics.flg_r_bet) then 1 else 0 end))) + (sum(tourney_holdem_hand_player_statistics.cnt_r_raise))) * 1.0 )/( ((sum(tourney_holdem_hand_player_statistics.cnt_f_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_t_call)) + (sum(tourney_holdem_hand_player_statistics.cnt_r_call))))) ELSE 0 END) , (( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end)))) 0 THEN (((sum((case when(tourney_holdem_hand_player_statistics.flg_vpip) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))))) ELSE 0 END) ) * 100), (( (CASE WHEN ( (sum((case when(tourney_holdem_hand_player_statistics.flg_f_saw) then 1 else 0 end)))) 0 THEN (((sum((case when(tourney_holdem_hand_player_statistics.flg_showdown) then 1 else 0 end))) * 1.0 )/( (sum((case when(tourney_holdem_hand_player_statistics.flg_f_saw) then 1 else 0 end))))) ELSE 0 END) ) * 100), (CASE WHEN ( (((sum((case when(tourney_holdem_hand_player_statistics.id_hand > 0) then 1 else 0 end))) * 1.0 )/( 100)) FROM tourney_holdem_summary)) ELSE 0 END) ,LEFT OUTER JOIN tourney_holdem_hand_player_combinations ON tourney_holdem_hand_player_statistics.id_hand = tourney_holdem_hand_player_combinations.id_hand AND tourney_holdem_hand_player_statistics.id_player = tourney_holdem_hand_player_combinations.id_player AND (tourney_holdem_summary.id_tourney = tourney_holdem_hand_player_statistics.id_tourney){FILTERREQ:tourney_holdem_summary} AND ((tourney_holdem_hand_player_statistics.id_hand > 8692)) AND ((tourney_holdem_hand_player_statistics.id_player = 21374)) GROUP BY tourney_holdem_hand_player_statistics.id_player, tourney_holdem_hand_player_statistics.id_blinds, tourney_holdem_hand_summary.cnt_players, ((case when( lookup_positions.flg_blinds) then 0 else (case when( lookup_positions.flg_ep) then 1 else (case when( lookup_positions.flg_mp) then 2 else 3 end) end) end)) ; Reason: Fatal Error (ERROR: syntax error at or near "FROM" LINE 1: ..._hand > 0) then 1 else 0 end))) * 1.0 )/( 100)) FROM tourn... ^ )
