select * from t_user where time>DATE_SUB(CURDATE(), INTERVAL 1 WEEK) --一周
select * from t_user where time>DATE_SUB(CURDATE(), INTERVAL 3 MONTH) --三月
select * from t_user where time>DATE_SUB(CURDATE(), INTERVAL 1 YEAR) --一年
delete from g5_write_table where wr_datetime < DATE_SUB(CURDATE(), INTERVAL 3 MONTH)