Fork me on GitHub

文章分类 -  MYSQL

摘要:一般后台做报表什么的,可能会用到 createTime 创建时间, 就是你要对比的时间,表的字段类型为 datetime 直接上代码 查询上周的数据 SELECT count(id) as count FROM user WHERE YEARWEEK(date_format(createTime,' 阅读全文
posted @ 2019-04-16 11:16 rstyro 阅读(1113) 评论(0) 推荐(0)