mysql 查询近几天的结果 按每天的粒度查询

select count(1),DATE_FORMAT(FROM_UNIXTIME(createtime/1000), '%Y-%m-%d') as time 
from bskuser 

where createtime between 1487347200000 and 1488211199000 
group by time

 

posted @ 2017-02-28 21:50  webbky  阅读(424)  评论(0编辑  收藏  举报