sqlserver中的日期函數

–按日統計 SELECT CONVERT(VARCHAR(10),日期列,120) AS days,COUNT(1) AS totalCount FROM 表 GROUP BY CONVERT(VARCHAR(10),日期列,120) ORDER BY days –按周統計 select datepart(week, 日期列) AS weekCount, sum(1) AS totalCount
相關文章
相關標籤/搜索