sql2005统计每天的数据

SELECT count(createdate),REPLACE(CONVERT(varchar(10),createdate,120),N'-0','-') FROM Edu_SearchHotWords

 GROUP BY REPLACE(CONVERT(varchar(10),createdate,120),N'-0','-') ORDER BY CONVERT(datetime,REPLACE(CONVERT(varchar(10),createdate,120),N'-0','-')) desc

posted @ 2009-09-23 16:07  Jason.Bird  阅读(190)  评论(0编辑  收藏  举报