本文共 390 字,大约阅读时间需要 1 分钟。
select count(*) as repeat_count,a.u_id from user_blind_box as a group by a.u_id having repeat_count = 28
select log.*,count(DISTINCT(u_id)) as total,DATE_FORMAT(time,'%Y-%m-%d') as day from log GROUP BY day;# time为时间戳的情况,转为日期格式在查询select log.*,count(DISTINCT(u_id)) as total,DATE_FORMAT(from_unixtime(time, '%Y-%m-%d %H:%i:%S'),'%Y-%m-%d') as day from log GROUP BY day;
转载地址:http://mtusn.baihongyu.com/