标签:
select from_unixtime(regtime,‘%Y%m%d‘) as days,count(user_id) as count from bbj_user group by days //格式化的话 select date_format(from_unixtime(regtime),"%Y-%m-%d") as days,count(user_id) as count from bbj_user group by days from bbj_user group by days
然后查询结果如下
days count
20141116 24
20141117 3
很简单的就实现了一个统计需求
标签:
原文地址:http://my.oschina.net/u/1414906/blog/380269