Mysql按天统计


时间戳

select FROM_UNIXTIME(yourtime,'%Y%m%d') as days,uid from yourtable
group by days


Datetime

select DATE_FORMAT(yourtime,'%Y%m%d') as days,uid from yourtable
group by days

 

posted @ 2017-09-27 15:11  北里闻箫  阅读(102)  评论(0编辑  收藏  举报