标签:
select hour(dateTime) as hour, count(1) as count
from tableName
where DATE_FORMAT(dateTime,‘%Y-%m-%d‘) = ‘2001-01-01‘
group by hour(dateTime);
SELECT COUNT(1) FROM wx_pvuv_log where DATE_FORMAT(create_time,‘%Y-%m-%d %H‘) = ‘2015-07-20 21‘;
标签:
原文地址:http://www.cnblogs.com/dashuai01/p/4981634.html