1.sql查询本周数据
select * from 表 where date_format(时间字段,'%Y-%m') = date_format(now(),'%Y-%m')
select * from w_store_inventory where date_format(production_date,'%Y-%m')=date_format(now(),'%Y-%m')
2.sql查询本月数据
select * from 表 where YEARWEEK(date_format(时间字段,,'%Y-%m-%d')) = YEARWEEK(now());
SELECT * FROM w_store_inventory WHERE YEARWEEK(date_format(production_date,'%Y-%m-%d')) = YEARWEEK(now());