sql两个日期之间的查询统计

sql查询统计

  sql语句:

      select count(code) as '统计',create_time as '订单时间' from sp_orders where datediff(create_time,'2017-06-06')>=0 and datediff(create_time,'2017-09-09')<=0 group by month(create_time)

  查询结果:

  sql两个日期之间的查询统计