MySQL查询本周、上周、本月、上个月份数据的sql代码
摘要:
查询当前这周的数据SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) = YEARWEEK(now());查询上周的数据SELECT name,submittime FRO... 阅读全文
posted @ 2015-11-20 11:55 逍遥郭 阅读(307) 评论(0) 推荐(0) 编辑