摘要: 第一部分:SQL的本月统计和本周统计本月统计(MySQL) 1select * from booking where month(booking_time) = month(curdate()) and year(booking_time) = year(curdate()) 本周统计(MySQL) 1select * from spf_booking where month(booking_time) = month(curdate()) and week(booking_time) = week(curdate()) [SQLServer]表名为:tableName 时间字段名为:theD 阅读全文