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) --一年