1.统计今天数据
and to_days(create_time) = to_days(now())
2.统计本周
YEARWEEK(date_format(create_time,'%Y-%m-%d'),1) = YEARWEEK(now(),1)
3.统计本月
date_format(create_time,'%Y-%m')=date_format(now(),'%Y-%m')
4.近7天
create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)