MySQL查詢本週、上週、本月、上個月份數據的sql腳本

查詢當前這周的數據 SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) = YEARWEEK(now()); 查詢上週的數據 SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submitt
相關文章
相關標籤/搜索