sql查询某个小时段的数据
/ / 点击 /1 | mysql> select EXTRACT(HOUR FROM createdate) as hour, count(*) as count from user where left(createdate,10)='2006-03-30' group by hour; |
全文完。
1 | mysql> select EXTRACT(HOUR FROM createdate) as hour, count(*) as count from user where left(createdate,10)='2006-03-30' group by hour; |