select count(*) from KP_CSN_BET_HIST where REG_DTM < date_sub(NOW(),interval 3 month);
select count(*) from KP_ESPT_BET_HIST where REG_DTM < date_sub(NOW(),interval 3 month);
select count(*) from KP_SLOT_BET_HIST where REG_DTM < date_sub(NOW(),interval 3 month);
select count(*) from tb_betting_info where create_dt < date_sub(NOW(),interval 3 month);
select count(*) from tb_betting_info_callback where create_dt < date_sub(NOW(),interval 3 month);

select count(*) from member_bet where create_dt < date_sub(NOW(),interval 3 month);
select count(*) from member_bet_detail where create_dt < date_sub(NOW(),interval 3 month);

select count(*) from member_money_charge_history where create_dt < date_sub(NOW(),interval 3 month);
select count(*) from member_money_exchange_history where create_dt < date_sub(NOW(),interval 3 month);

select count(*) from mini_game where start_dt < date_sub(NOW(),interval 3 month);
select count(*) from mini_game_member_bet where calculate_dt < date_sub(NOW(),interval 3 month);

select count(*) from member_money_charge_sms where create_dt < date_sub(NOW(),interval 3 month);
select count(*) from member_ip_block_history where create_dt < date_sub(NOW(),interval 3 month);
select count(*) from member_login_history where login_datetime < date_sub(NOW(),interval 3 month);
select count(*) from menu_qna where create_dt < date_sub(NOW(),interval 3 month);
select count(*) from sms_auth where create_dt < date_sub(NOW(),interval 3 month);
select count(*) from t_message where reg_time < date_sub(NOW(),interval 3 month);
select count(*) from t_message_list where reg_time < date_sub(NOW(),interval 3 month);

-- delete  from KP_CSN_BET_HIST where REG_DTM < date_sub(NOW(),interval 3 month);
-- delete  from KP_ESPT_BET_HIST where REG_DTM < date_sub(NOW(),interval 3 month);
-- delete  from KP_SLOT_BET_HIST where REG_DTM < date_sub(NOW(),interval 3 month);
-- delete  from tb_betting_info where create_dt < date_sub(NOW(),interval 3 month);
-- delete  from tb_betting_info_callback where create_dt < date_sub(NOW(),interval 3 month);

-- delete  from member_bet where create_dt < date_sub(NOW(),interval 3 month);
-- delete  from member_bet_detail where create_dt < date_sub(NOW(),interval 3 month);

-- delete  from member_money_charge_history where create_dt < date_sub(NOW(),interval 3 month);
-- delete  from member_money_exchange_history where create_dt < date_sub(NOW(),interval 3 month);

-- delete  from mini_game where start_dt < date_sub(NOW(),interval 3 month);
-- delete  from mini_game_member_bet where calculate_dt < date_sub(NOW(),interval 3 month);

-- delete  from member_money_charge_sms where create_dt < date_sub(NOW(),interval 3 month);
-- delete  from member_ip_block_history where create_dt < date_sub(NOW(),interval 3 month);
-- delete  from member_login_history where login_datetime < date_sub(NOW(),interval 3 month);
-- delete  from menu_qna where create_dt < date_sub(NOW(),interval 3 month);
-- delete  from sms_auth where create_dt < date_sub(NOW(),interval 3 month);
-- delete  from t_message where reg_time < date_sub(NOW(),interval 3 month);
-- delete  from t_message_list where reg_time < date_sub(NOW(),interval 3 month);
