#当创建时间和当前时间相同,就是新增用户 select date(dt),count(),round(sum(if(dt=min_time,1,0))/count(),2) from ( #解决跨天问题用union select uid,date(in_time) dt from tb_user_log union select uid,date(out_time) dt from tb_user_log )t1 join ( #求每个uid的创建时间 select uid,min(date(in_time)) min_time from tb_user_log group by uid )t...