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
而後查詢結果以下sql
days countunix
20141116 24code
20141117 3orm
很簡單的就實現了一個統計需求
form