ALTER TABLE VisitInfo
ADD V_AddTime datetime
//查询近期12个月每个月的访客人数
SELECT CONVERT(varchar(7), V_StDate, 120) AS Month, COUNT(V_Id) AS number
FROM VisitInfo where V_StDate between DateAdd(m,-12,getdate()) and GETDATE()
GROUP BY CONVERT(varchar(7), V_StDate, 120)