摘要:
--以天为单位 select count( *) as customercount,str(DATEPART(YY,RegTime)) + N'年' + cast( DATEPART(mm,RegTime) as varchar(5) )+ N'月' + cast( DATEPART(dd,RegTime) as varchar(5) )+ N'日' as timetypeFROM CRM_Customer WHERE 1=1GROUP BY DATEPART(YY,RegTime),DATEPART(mm,RegTime),DATEPART(d 阅读全文