select Min(VisitTime),count(*) as Num from online group by datediff(day,VisitTime,getdate()) 转载于:https://www.cnblogs.com/modou/articles/146231.html