select day(CreatedAt) 日 ,COUNT(Name) count from [Ruiec_NewCloud_BlogCenter].[dbo].[T_Blog_Demand]
where CreatedAt between '2017-06-01' and '2017-07-01'
group by year(CreatedAt),month(CreatedAt) ,day(CreatedAt) /*日统计*/
select month(CreatedAt) 月 ,COUNT(Name) count from [Ruiec_NewCloud_BlogCenter].[dbo].[T_Blog_Demand]
where CreatedAt between '2017-01-01' and '2017-12-31'
group by month(CreatedAt) ,year(CreatedAt) /*月统计*/
select sum(Name) as count,datepart(week,CreatedAt) 周 from
[Ruiec_NewCloud_BlogCenter].[dbo].[T_Blog_Demand] where CreatedAt between '2017-06-01' and '2017-07-01'
group by datepart(week,CreatedAt) /*周统计*/
select month(CreatedAt) 月 ,day(CreatedAt),COUNT(Name) count from [Ruiec_NewCloud_BlogCenter].[dbo].[T_Blog_Demand]
where CreatedAt between '2017-06-01' and '2017-07-01'
group by month(CreatedAt) ,day(CreatedAt)
where CreatedAt between '2017-06-01' and '2017-07-01'
group by year(CreatedAt),month(CreatedAt) ,day(CreatedAt) /*日统计*/
select month(CreatedAt) 月 ,COUNT(Name) count from [Ruiec_NewCloud_BlogCenter].[dbo].[T_Blog_Demand]
where CreatedAt between '2017-01-01' and '2017-12-31'
group by month(CreatedAt) ,year(CreatedAt) /*月统计*/
select sum(Name) as count,datepart(week,CreatedAt) 周 from
[Ruiec_NewCloud_BlogCenter].[dbo].[T_Blog_Demand] where CreatedAt between '2017-06-01' and '2017-07-01'
group by datepart(week,CreatedAt) /*周统计*/
select month(CreatedAt) 月 ,day(CreatedAt),COUNT(Name) count from [Ruiec_NewCloud_BlogCenter].[dbo].[T_Blog_Demand]
where CreatedAt between '2017-06-01' and '2017-07-01'
group by month(CreatedAt) ,day(CreatedAt)