mysql 查询时间段每分 小时 天的统计数据
// 查询8月份某个用户的开单的数量
select DATE_FORMAT(create_datetime,'%Y-%m-%d') as datetime,count(id_account) as num where id_account=account_id and create_datetime>='2014-08-01 0:0:0' and create_datetime<='2014-08-31 23:59:59' group by DATE_FORMAT(create_datetime,'%d')

浙公网安备 33010602011771号